Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: grep in line and print

by justbow (Initiate)
on Jan 24, 2013 at 02:36 UTC ( #1015067=note: print w/ replies, xml ) Need Help??


in reply to Re: grep in line and print
in thread grep in line and print

do u mean like this :

foreach print $line,"\n"; (@macall) {
it will be error :D


Comment on Re^2: grep in line and print
Download Code
Re^3: grep in line and print
by roboticus (Chancellor) on Jan 24, 2013 at 19:29 UTC

    justbow:

    No, I meant like this:

    my @macall = qw(print @input); foreach $line (@macall) { print "<$line>\n"; if ($line =~ /C4:46:19:75:C1:55:\s+(\S+)/) { $id = $1; } } print "ID = $id"; return (0);

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2015-07-02 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (46 votes), past polls