Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^3: Problem with ampersand and regex

by davido (Archbishop)
on Dec 19, 2012 at 20:24 UTC ( #1009627=note: print w/replies, xml ) Need Help??

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

How are you filling @array?


Replies are listed 'Best First'.
Re^4: Problem with ampersand and regex
by Anonymous Monk on Dec 19, 2012 at 20:30 UTC
    It is being filled by the output of a system call to ldapsearch. Thank you.
      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://1009627]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2016-10-28 20:53 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (387 votes). Check out past polls.