#!/usr/bin/perl\r\n
it will be looking for a file called 'perl\r' in /usr/bin. Whereas
Will actually work.#!/usr/bin/perl -wT\r\n
Do a quick 'hexdump -c filename' to see if this is the case.
Update: A bit more about the time I got bit by this.... I had a jr sysadmin working under me put a new 'ifcfg-eth0' to a soon-to-be-production machine with a buch of '\r's in it. It looked something like:
DEVICE=eth0\r IPADDR=xx.xx.194.149\r NETWORK=xx.xx.194.128\r NETMASK=255.255.255.128\r BROADCAST=xx.xx.194.255\r
When we cycled the machine right before deploying it, we lost remote connectivity (it was trying to configure the device 'eth0\r'. We had to go down to the colocation facility and debug if from there. The error message on the screen was 'eth0 no such device' (i.e 'eth0\r no such device') which wasn't particularly helpful. After cycling the machine numerous times and swapping out some hardware, someone noticed that emacs was labeling it as a DOS file. A quick 'perl -pi -e "s/\r//g" ifcfg-eth0' fixed it.
-Blake
In reply to Re: Turning *off* warnings causes the script to fail :(
by blakem
in thread Turning *off* warnings causes the script to fail :(
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |