Click here to get back home

problem with system(@args)

 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
problem with system(@args) npritchard@mail.com 02-18-2005
Get Chitika Premium
Posted by npritchard@mail.com on February 18, 2005, 7:52 am
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
Net::IRC "args" type? July 9, 2005, 12:47 am
Why doesn't chdir (@args) work? June 14, 2006, 10:43 pm
Perl Executable and Script Name -- NOT Args November 29, 2004, 9:02 am
howto set args for perl executable? December 30, 2004, 8:26 am
How to print all command args in open March 8, 2005, 2:01 pm
parsing command line args October 29, 2006, 7:03 pm
WHY are args for sprintf in scalar context? October 31, 2007, 9:25 am
system problem May 16, 2005, 8:35 pm
problem using system() April 9, 2008, 8:42 am
Python Doc Problem Example: os.system September 4, 2005, 5:16 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap