Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: grep and array

by Aristotle (Chancellor)
on Jul 09, 2002 at 15:20 UTC ( [id://180506]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @hold2 = map /(\w+\.bld)/, <OUTother>;
  2. or download this
    my $hold2 = join "|", @hold2;
    
    `egrep -wn '$hold2' nbsssbs//esel/bld/*.bld nbsssbs/sbc/bld/*.bld nbss
    +bts/btsc/bld/*.bld > $temp/otherblds2.txt `;
    
  3. or download this
    my $hold2 = join "|", map /(\w+\.bld)/, <OUTother>;
  4. or download this
    system "egrep -wn '$hold2' nbsssbs//esel/bld/*.bld nbsssbs/sbc/bld/*.bld nbssbts/btsc/bld/*.bld > $temp/otherblds2.txt" or die "egrep failed: $!";
  5. or download this
    open EGREP, "egrep -wn '$hold2' nbsssbs//esel/bld/*.bld nbsssbs/sbc/bl
    +d/*.bld nbssbts/btsc/bld/*.bld |" or die "Pipe to egrep failed: $!";
    my @othersblds = <EGREP>;
    close EGREP;
    
  6. or download this
    open(OUTother, "<", "C:/Perl/MyScripts/tmp.txt") or die "Couldn't open
    + file: $!";
    my $hold2 = join "|", map /(\w+\.bld)/, <OUTother>;
    close OUTother;
    ...
    open EGREP, "egrep -wn '$hold2' nbsssbs//esel/bld/*.bld nbsssbs/sbc/bl
    +d/*.bld nbssbts/btsc/bld/*.bld |" or die "Pipe to egrep failed: $!";
    my @othersblds = <EGREP>;
    close EGREP;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found