Click here to get back home

Using one methods variable value in another method inside a module

 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
Using one methods variable value in another method inside a module king 04-29-2007
Posted by king on April 29, 2007, 9:04 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
use one subroutine's variable value in another subroutine inside a module. April 26, 2007, 9:28 am
Use of constant inside a module? April 25, 2007, 10:09 am
ISO good inside-out objects module December 24, 2005, 1:37 pm
Help with variable with regex inside. December 4, 2006, 2:05 am
Variable containing name of function inside a package June 27, 2005, 5:10 pm
How do i get the charactors inside the ( ) from a string variable March 25, 2006, 2:46 pm
Perl Special Variable Containing the name of the method currently in? May 30, 2008, 2:06 pm
using the first variable on the command line inside a perl program October 13, 2006, 4:52 pm
string matching inside file and save in a variable June 6, 2007, 5:16 am
export a variable from a module March 10, 2006, 6:27 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap