Merge branch 'eval-code'
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 17 Jun 2010 16:46:26 +0000 (18:46 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 17 Jun 2010 16:46:26 +0000 (18:46 +0200)
1  2 
README

diff --combined README
--- 1/README
--- 2/README
+++ b/README
@@@ -44,24 -44,17 +44,24 @@@ any other dataset which has same uniqu
  
  Modify your data using perl snippets
  
- Experimental REPL console supports perl snippets which get $rec hash which is one
+ Experimental REPL console supports perl snippets which get $row hash which is one
  element from your dataset. All values are repetable, so you always have to create
  array of values if you are creating new columns, even for single value.
  
  * generate new columns with number of elements in some other column
  
-   $rec->{count} = [ $#{ $rec->{original} } + 1 ];
+   $row->{count} = [ $#{ $row->{original} } + 1 ];
  
  * generate century column from year
  
-   foreach my $year ( @{ $rec->{Year} } ) {
-     push @{ $rec->{century} }, int($year/100)+1;
+   foreach my $year ( @{ $row->{Year} } ) {
+     push @{ $row->{century} }, int($year/100)+1;
    }
  
 +* modify existing column
 +
 +  foreach ( @{ $rec->{'Cited Author'} } ) {
 +    s/^\.+//;
 +    $_ = uc $_; # assigment is needed to modify value!
 +  }
 +