in reply to Re^2: Vertical Regex
in thread Vertical Regex
my ($frg) = @ARGV; $frgfile = "$frg"; open(frgfile) or die("Unable to open FRG file");
That's very confusing form. It's a good practice to always start your scripts with
this may help you to avoid many problems. In this case you would see some warnings. I'd write this as follows:use strict; use warnings;
Note how you can store filehandle in scalar variable.open my $fd, '<', $ARGV[0] or die $!; while (<$fd>) { ...
|
|---|