in reply to Propose addition to use warnings?
There's nothing inherently wrong in passing a filehandle:
#!/usr/bin/perl use warnings; use strict; main(@ARGV); sub main { my ($file1, $file2) = @_; open my $fh, '<', $file1 or die $!; print "first: $_" while <$fh>; close $fh; again($fh, $file2); print "again: $_" while <$fh>; } sub again { my ($fh, $name) = @_; open $fh, '<', $name or die $!; }
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Propose addition to use warnings?
by perldigious (Priest) on Nov 28, 2016 at 18:29 UTC | |
by stevieb (Canon) on Nov 28, 2016 at 18:50 UTC |