Click here to get back home

Perl system call fails under windows 2003 server

 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
Perl system call fails under windows 2003 server rahulkats 06-14-2007
Get Chitika Premium
Posted by rahulkats on June 14, 2007, 2:08 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

Posted by Ian Wilson on June 15, 2007, 6:00 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
System process failed to die on Windows Server 2003 April 23, 2007, 9:08 am
Perl will not run exe on Windows Server 2003 May 17, 2005, 11:19 am
PPM fails on a Windows 2003 with a existing Oracle 10g installation April 6, 2005, 1:57 pm
ActivePerl / IIS 6 / Windows Server 2003 SP1 April 15, 2005, 12:13 pm
Parallel::ForkManager not working as intended on Windows Server 2003 September 20, 2006, 9:26 am
how to manage phpBB, windows 2003 server and FreeBSD user accounts simultaneously. November 29, 2004, 9:18 pm
Is there a web interface tool that can manage accounts of FreeBSD and Windows 2003 server simultaneously January 5, 2005, 6:55 pm
Perls system() call fails in a cgi-file running on win2k and apache October 12, 2004, 7:06 am
windows program return values vs perl return values from a call to system() -- windows post only October 29, 2005, 6:22 pm
403 error for perl script on Win 2003 server November 14, 2005, 5:18 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap