Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Perl Log file extraction help required

by Generoso (Prior)
on Sep 22, 2012 at 07:55 UTC ( [id://995073]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl Log file extraction help required
in thread Perl Log file extraction help required

If you are not useing perl 5.010 'use 5.010' then mabe this will work.

#!/usr/bin/env perl #use 5.010; use strict; use warnings; while (<DATA>) { my @caught = /\{([^}]+)/g; next unless @caught; #say for @caught; foreach (@caught){print $_."\n"}; } __DATA__ ................... ................... <CMD> windowSelect 444.235666.5542.2656565.1255 <CMD> spaceObject -fixSide bottom -space 0 Spacing instances ... Adding vertical channel spacing of 0.0000um between the following selected instances/modules: {dupe_core/pads/tran_w_1} {dupe_core/pads/tran_w_1} {dupe_core/pads/htran_d_13} {dupe_core/pads/rec_p_14} {dup/pads/VDD_ight1} {dup/pa/GND_g} {dummy_core/pads/dummy_dig22} {dupe_core/pads/dummy_dig23} {dupe_core/pads/comp_pad1} {dupe_core/pad/CORE_vdd1} <CMD> deselectAll <CMD> selectInst dummy_core/pads/IO_gnd_right18 <CMD> selectInst dummy_core/pads/IO_vdd_right18 <CMD> uiSetTool move5 .............. ............... ....................

Replies are listed 'Best First'.
Re^4: Perl Log file extraction help required
by kcott (Archbishop) on Sep 22, 2012 at 08:22 UTC

    G'day Generoso,

    You can add -l to the shebang line instead of restructuring the code. This produces the same output:

    #!/usr/bin/env perl -l use strict; use warnings; while (<DATA>) { my @caught = /\{([^}]+)/g; next unless @caught; print for @caught; }

    See perlrun for a description of this option.

    -- Ken

Re^4: Perl Log file extraction help required
by renjoooz (Initiate) on Sep 22, 2012 at 09:01 UTC
    </code> THIS TIME ITS PERFECT THANKS A LOT </code>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-24 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found