Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Windows and UNIX have different style line endings. If you run this under Win32 but use a file with UNIX-style endings, the whole file will be slurped instead of processed line by line. Try this before opening your file:
This will cause your script to assume UNIX line endings, but if you pass the parameter --windows to the command line, it will then assume the file has Windows-style line endings. You could autodetect this, too, but it involves opening the file and reading until you find one of those pairs, then resetting the filehandle. I know I've seen code for that on PerlMonks...
<-radiant.matrix->
A collection of thoughts and links from the minds of geeks The Code that can be seen is not the true Code "In any sufficiently large group of people, most are idiots" - Kaa's Law In reply to Re: ?? Blazes under Linux; crawls under XP & Win2K...
by radiantmatrix
|
|