in reply to using -w breaks simple script

Generally when you get funky error messages that seem to have words missing at the beginning, it's because the words that were printed included some funky unprintable characters (frequently \r, which causes the second part of the error message to overwrite the first part). Try this: 'perl tn52400.pl | cat -vet', and if you see funky characters in there, try 'cat -vet tn52400.pl' to see if they are in your script too...


We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re: Re: using -w breaks simple script
by Theo (Priest) on Oct 15, 2003 at 20:27 UTC
    The first test showed nothing odd. The second test revealed the gremlin: ^M$ after each line. I now remember reading about anothermonk with the same problem. Without the -w flag, Perl ignored everything after the filename. Add a flag after the filename and Perl kept looking till it found the gremlin!

    Thank you jasonk!

    -theo-
    (so many nodes and so little time ... )
    Note: All opinions are untested, unless otherwise stated