Sure there is, but you will need to think about what value the variable should have after the while loop ends:
my $year; while( my $title = <CSV3> ) { $year = find_year( $title ); }; print "I now have a year of '$year'\n";
Do you really want to keep only one year from all the titles stored in your CSV file?
In reply to Re^9: Addional "year" matching functionality in word matching script
by Corion
in thread Addional "year" matching functionality in word matching script
by bms9nmh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |