Click here to get back home

Script continues running after an exit() call?

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Script continues running after an exit() call? Debo 06-15-2005
Get Chitika Premium
Posted by Debo on June 15, 2005, 12:02 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
In a Perl script 'exit 1' returns exit status 0! December 8, 2006, 1:07 pm
Problem with cp in system call running Mac OS X November 7, 2004, 10:50 am
Trouble running a unix command with a subroutine call November 24, 2005, 7:03 am
Perls system() call fails in a cgi-file running on win2k and apache October 12, 2004, 7:06 am
How to fetch output of some other script in the current running perl script? October 25, 2007, 8:18 am
Exit status from perl script May 3, 2005, 11:33 am
How to generate radio buttons in Perl/CGI script with call to shell script? November 23, 2007, 11:24 pm
perl interpreter automatically exit windows so how I can saw the result of script? August 20, 2004, 1:57 am
DOS-Box script is running in set always on top November 21, 2006, 11:54 am
Long running CGI script June 17, 2005, 4:13 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap