Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^4: Problem with ampersand and regex

by Anonymous Monk
on Dec 19, 2012 at 20:30 UTC ( #1009628=note: print w/replies, xml ) Need Help??

in reply to Re^3: Problem with ampersand and regex
in thread Problem with ampersand and regex

It is being filled by the output of a system call to ldapsearch. Thank you.

Replies are listed 'Best First'.
Re^5: Problem with ampersand and regex
by frozenwithjoy (Priest) on Dec 19, 2012 at 21:18 UTC
    What if you use backticks (`ldapsearch`) instead of system("ldapsearch"). When I put mail: in a file and called @array = `cat file`, your script worked, but not when using @array = system("cat file").

    Take a look at What's the difference between Perl's backticks, system, and exec?. The system() call returns the exit status, not the actual result (STDOUT) of the command like the backtick operator does.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1009628]
[holli]: what's that smell?
[LanX]: good evening! :)
[Discipulus]: ProvoLanX? grin..
[holli]: wow. the google translation to german is really good
LanX has to go go/
[holli]: baba

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2017-11-20 19:58 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (292 votes). Check out past polls.