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

Replies are listed 'Best First'.
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.