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

Re: A simple backticks question

by kennethk (Abbot)
on Mar 17, 2014 at 16:33 UTC ( #1078623=note: print w/ replies, xml ) Need Help??

in reply to A simple backticks question

The high order concept here is Context. The two major contexts are list and scalar. For example, calling an array in list context returns a list of the values in the array; calling an array in scalar context returns the length of the array.

The parentheses following foreach are an indicator that you are calling your arguments in list context. From `STRING`:

In list context, returns a list of lines (however you've defined lines with $/ or $INPUT_RECORD_SEPARATOR), or an empty list if the command failed.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Comment on Re: A simple backticks question
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2015-11-26 11:59 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (697 votes), past polls