LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   perl expert wanted (https://www.linuxquestions.org/questions/linux-software-2/perl-expert-wanted-543051/)

Musikolo 04-03-2007 01:34 PM

perl expert wanted
 
Hi mates,

I'm a Yoper packager having an old issue with our perl package. Somehow it turns we have a bug so when we execute next, we get a leading blank (space):

http://yoper.pastebin.no/1282

This is causing other package builds to fail. Just in case it maybe give you some information, it was built with the following options: http://yoper.pastebin.no/1284

Here you also have the /usr/lib/perl5/5.8.8/i686-linux-thread-multi/Config.pm file fully: http://yoper.pastebin.no/1283

Any help greatly appreciated! :confused:

TB0ne 04-03-2007 03:07 PM

Not quite sure what you're after, but it seems like you want to remove a leading space from a value.

Try this sed when you're defining that var in your perl program

$var = (whatever you have assigned first, with the blank);
$var =~ s/^\s+//;

Now $textvar will be missing the leading character.

There are other ways to do things, but that will work.

Musikolo 04-03-2007 04:20 PM

Hi TB0ne,

thanks for your reply. I think I've found the solution to my problem on my own. I was building perl using the -A switch instead of -D. The former adds a blank space while the latter does not. Please, have a look at the next link for more details: http://sial.org/pbot/23975

Best regards! :)


All times are GMT -5. The time now is 02:10 PM.