<[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> My scripts, which are running perfectly well on a Win2000 webserver, do not
> function correctly under MacOS X.
> 
> The first thing I've been able to identify that is malfunctioning is the
> standard file reading process I've always used:
> 
> while(<FILE>){
> push (@array,$_);
> }
> 
> print $array[1];  ##prints the second line of file
> 
> For some reason MacOS X reads the entire file in to $array[0] the first time
> round, instead of putting one line per array element.
> 
> Has anybody else had this problem?

[localhost:~] tor% perl -e 'while(<>){push(@array,$_)} print "\$array\[1\]:
$array[1]";'
first line # my input
second line # my input
third line  # my input + ^D
$array[1]: second line
[localhost:~] tor% 

I never had any problems with this.
Mac OS X 10.1.5, Perl 5.6.0

Tor

Reply via email to