in reply to Re: splitting the bus and print -- oneliner
in thread splitting the bus and print

the below two options you suggested are not working for me. I'm getting error as "Bad : modifier in $ ($).". Can u please help me on this......
perl -nlE "say for/\[(\d+):(\d+)\](\w+)/?map{$3.qq([$_])}$2..$1:$_" po +rtbus.txt perl -nlE "push @res,/\[(\d+):(\d+)\](\w+)/?map{$3.qq([$_])}$2..$1:$_; +END{say for @res}" portbus.txt

Replies are listed 'Best First'.
Re^3: splitting the bus and print -- oneliner
by Discipulus (Canon) on Apr 27, 2016 at 07:16 UTC
    Bad : modifier in $ ($). seems to me not a Perl error.

    A fast search indicate a C-shell or Tcsh as responsable for that error.

    Please note also that, unfortunately, i used the " doublequote to delimit the oneliner, and this because i'm, unfortunately, on windows. Linux users must use signle quote around code '

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.