Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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.


Comment on Re^4: Problem with ampersand and regex
Re^5: Problem with ampersand and regex
by frozenwithjoy (Curate) on Dec 19, 2012 at 21:18 UTC
    What if you use backticks (`ldapsearch`) instead of system("ldapsearch"). When I put mail: asdf@123.com 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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1009628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2014-08-27 12:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (237 votes), past polls