in reply to HP-UX best practices
Wow. I learn something new everyday: the one-argument form of open:$FILE="/etc/mnttab"; open FILE or die "Can't open $FILE: $!";
If EXPR is omitted, the global (package) scalar variable of the same name as the FILEHANDLE contains the filename.
Update: see also Single Argument Open
You can eliminate the array as follows:push @mnttab, ($lv, $fs) } %mnttab = @mnttab;
$mnttab{$lv} = $fs; }
See also:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: HP-UX best practices
by rustic (Monk) on May 25, 2012 at 07:18 UTC |