in reply to perlrun -0777 option

I've never dealt with Unicode so i can't help you there, but if you're looking to slurp a file into an array or scalar (something considered bad by most people, which i do a lot of ) why are you not using local?
my $var = ''; # or perhaps my @var = (); { local $/ = undef; open(FH,"<myfilepath/andname") or die "A horrible death $!"; $var = <FH> ; close(FH); }
Does unicode somehow thwart an undef'ed input record seperator ( $/ )?

Replies are listed 'Best First'.
Re: Re: perlrun -0777 option
by John M. Dlugosz (Monsignor) on Jun 26, 2003 at 16:53 UTC
    Because I want to do it with perl -pe. That is, the open, read, and print are all done in the stock set-up.
      So just do...
      perl -pe 'BEGIN { $/ = undef; } whatever'
      
Re: Re: perlrun -0777 option
by dataDrone (Acolyte) on Jun 26, 2003 at 16:29 UTC
    FYI... That was Me, forgot i logged out...