Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Print array values

by si_lence (Deacon)
on Aug 10, 2009 at 11:11 UTC ( #787301=note: print w/replies, xml ) Need Help??


in reply to Print array values

I'm not sure I understand your question right. If you want to see just the grep commands at the end of your post you can use somehing like this
use strict; use warnings; my @filenames = qw{filename1 filename2 filename3}; my @datas =qw{DATA1 DATA2}; foreach my $filename (@filenames) { foreach my $data (@datas) { print "grep -c $data $filename \n"; } }
to convert the DATA1 / DATA2 to lowercase is left as an exercise for the reader :-)
cheers, si_lence

Replies are listed 'Best First'.
Re^2: Print array values
by cdarke (Prior) on Aug 10, 2009 at 11:47 UTC
    Update: I had made an incorrect assumption on what the OP wanted, your are correct si_lence

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://787301]
help
Chatterbox?
[1nickt]: @20:54:200Z - "* talexb breathes deeply. Interview with BigCorp in 7 minutes."
[marto]: late, song of the day.
[marto]: I intend to do a live version of[ this with sonic pi at some event one day
[holli]: yes, that' s the one.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2017-11-18 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?