Click here to get back home

how do I call a function from a .so file in UNIX via a perl script?

 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
how do I call a function from a .so file in UNIX via a perl script? news.hinet.net 10-25-2004
Get Chitika Premium
Posted by news.hinet.net on October 25, 2004, 1:17 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 Koos Pol on October 25, 2004, 12:12 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
Can I use a function ref to call a function in a web script? October 2, 2008, 2:50 pm
Perl/unix script to convert a fixed width file to a tab delimited file September 29, 2007, 9:35 am
Perl regex function call May 8, 2006, 11:12 am
How to generate radio buttons in Perl/CGI script with call to shell script? November 23, 2007, 11:24 pm
Trouble running a unix command with a subroutine call November 24, 2005, 7:03 am
Is there any way to call a function w/in an RE October 24, 2004, 2:09 am
how to call a function using variable June 13, 2006, 12:23 pm
Indirect function call via Name January 5, 2007, 5:28 am
How to dynamically generate function name and call it? September 27, 2006, 9:31 am
Replacement in a string with a function call. November 28, 2006, 1:51 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap