in reply to sharing variables among 2 subroutines

Actually use your return variable?
foreach my $file ( @files ) { my ($project, $date) = parse_file( $file ); move_file( $file, $project, $date ); }

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: sharing variables among 2 subroutines
by kathys39 (Acolyte) on Nov 19, 2007 at 19:22 UTC
    I tried that. When I print out the value of project and date from the end of parse_file, they print out ok. However, if I do it after I return from parse_file (and before move_file) they are blank!