On Sun, 2007-08-05 at 13:21 +0100, Jorge Almeida wrote: > Is there some variable that will do for a file what $/ does for a > record? > What I mean is that in > $s=<STDIN> > the value of $s depends on the value of $/, but in > @arr=<STDIN>
You mention EOF and you mean EOL (end of line). Since you know the correct variable you have read perldoc perlvar I am not the expert however I recall reading something about using local I am guessing something like this: sub myfunction { local $/ = "\r"; # I am a mac file! my $input; open( $input, '<', "MYMacFile.txt" ) or die "Unable to open MYMacFile.txt $!"; while( <$input> ) { ... } close( $input ); } -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/