Help slurping a file?

2005-10-28 Thread Renee Halbrook
x27;t open $file for reading: $!\n"; readfile(); close(MYFILE); sub readfile(){ local($/) = "\r"; while ( my $line = ){ print "line is $line\n"; } } Renee Halbrook Bioinformatics Programmer The Carnegie Institution of Washington Department of Plant Biology 260 Panama Street Stanford, CA 94305

Re: Help slurping a file? -- Solved

2005-10-28 Thread Renee Halbrook
ines. This should work for just about every case: > > @lines = split /[\r\n]+/; > > (That will obliterate blank lines. If it's important to keep track of > blank lines, put parens around the regex to capture the line termination > characters -- each string of ([\r\n]+) will b