in reply to RegExp eating my $1 - FIXED!
Global symbol "$fname_" requires explicit package name at 701529.pl line 19. Execution of 701529.pl aborted due to compilation errors.You would need to surround $fname in braces.
As was noted by another poster, check for existence of an open filehandle with exists
Update: changed the open statement to a hash item (as noted by ikegami)if (! exists $files{$ffc}) { print "Adding new handle : $ffc\n"; open $files{$ffc}, '>', "${fname}_$ffc.txt" or die $!; }
|
|---|