Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Reading file and matching lines

by tbone654 (Beadle)
on Feb 11, 2014 at 20:41 UTC ( #1074502=note: print w/replies, xml ) Need Help??


in reply to Re^2: Reading file and matching lines
in thread Reading file and matching lines

modified one-liner and data to test...

F98020A@LUS76E8012758 /cygdrive/c/package
$ perl -ne ' if (/^h/){print "error starts with h program exiting"; exit;} if (/^G/){exit;} next if !/^E/; print $_;' data
E99HEADER|006|001
E99INSSCH|052|
E99POLCOM|1||IIL|62|35119849249024|||||
E99INSFAC2|C00124||||||XAJX0727,YGAX0000,ZAAJ0203,VABA0018,WJZA1800|

F98020A@LUS76E8012758 /cygdrive/c/package
$ cat data  (note: changed the data to have E's after old)
Q165HWN0X001
Q165HWN0X002
Q165HWN0X003
E99HEADER|006|001
E99INSSCH|052|
E99POLCOM|1||IIL|62|35119849249024|||||
E99INSFAC2|C00124||||||XAJX0727,YGAX0000,ZAAJ0203,VABA0018,WJZA1800|
G35119849249024
h189SMA2
E99INSSCH|052|
E99POLCOM|1||IIL|62|35119849249024|||||
E99INSFAC2|C00124||||||XAJX0727,YGAX0000,ZAAJ0203,VABA0018,WJZA1800|

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1074502]
help
Chatterbox?
[marioroy]: ... including MCE 1.830. Finally, reached the finish line. All is well.
[marioroy]: The issue on the Windows platform is many workers loading "required" modules simultaneously, more so with XS modules.
[marioroy]: ... at runtime.
[marioroy]: The other problem is if a module isn't thread or multi-process safe, there's no posix_exit equivalent on the Windows platform without exiting the entire script.
[Discipulus]: and the workaround you proposed works better? ie load them once and then copy them for threads?
[Discipulus]: ah this is another interesting point: how to know if a module is or is not thread safe?
[Discipulus]: .. sorry mario if i'm bothering you at 5:46

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2017-09-22 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (260 votes). Check out past polls.

    Notices?