Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: deletion of one line of a particula pattern

by drock (Beadle)
on Aug 23, 2004 at 20:06 UTC ( #385204=note: print w/replies, xml ) Need Help??


in reply to Re: deletion of one line of a particula pattern
in thread deletion of one line of a particula pattern

awesome... I wish I was better at reg exps. my only complaint is the output looks like:
(E1234), E1234 (E4545), E4545
instead of just
Exxxx Exxxx Exxxx

Replies are listed 'Best First'.
Re^3: deletion of one line of a particula pattern
by insensate (Hermit) on Aug 23, 2004 at 20:09 UTC
    That's odd... can you provide the snippet of code that's producing that output?
      : )
      use strict; use diagnostics; my $log = qq(/usr/local/log/lvimg_Ldrive_tapes.log); my $out = qq(/usr/local/log/output); open (F, "$log") || die "could not open file:$!"; open (F2, ">$out") || die "could not open file:$!"; sub mytime { my ($month,$day,$year,$hours,$min) = (localtime)[4,3,5,2,1]; sprintf ("%02d/%02d/%02d %02d:%02d\n", $month+1,$day,($year % +100),$hours,$min); } my $tm = &mytime; print F2 "$tm\n"; while (<F>) { #if ($_ =~ /(E0+)/ ) { local $, = "\t"; print F2 +(split)[3], "$1$/" if /\((E\d+)/; #} } close (F); close (F2);
        Get rid of the  +(split)[3], it looks leftover from some other try.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2023-02-06 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (34 votes). Check out past polls.

    Notices?