in reply to Re^2: unwanted ARGV in subroutine
in thread unwanted ARGV in subroutine
Hi rizzler
Try this
sub addheader{ my($infile,$header)=@_; open(FILE, "$infile"); my $text=do {local $/; <FILE>}; close FILE; open(FILE,">$infile"); print FILE $header; print FILE $text; close FILE; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: unwanted ARGV in subroutine
by Anonymous Monk on Oct 30, 2012 at 07:10 UTC |
In Section
Seekers of Perl Wisdom