Click here to get back home

testing for existence of an inline file with Inline::Files

 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
testing for existence of an inline file with Inline::Files Sven Wolf 12-02-2004
Get Chitika Premium
Posted by Sven Wolf on December 2, 2004, 5:28 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
Testing File Existence - best way? December 12, 2007, 11:36 pm
Inline C August 6, 2004, 9:04 am
Inline::Tcl vs. Inline::Tcl August 23, 2006, 12:09 pm
Q: re Inline and Benchmark November 3, 2004, 1:23 am
Questions about Inline::C September 28, 2006, 3:58 am
Inline C and different platforms October 2, 2006, 2:50 pm
Parallel::Pvm and Inline C April 8, 2007, 1:18 am
Inline regex October 16, 2007, 11:18 am
Memory leak with Inline::C July 11, 2004, 8:15 pm
Memory leak with Inline::C July 11, 2004, 8:28 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap