> -----Original Message----- > From: Noah [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 10, 2008 16:28 > To: Perl Beginners > Subject: matching lines in array - other ways to code > > Hi there, > > could somebody please suggest some other ways to simplify the reading > and perhaps make the following process quicker? > > > print CHANGE "what 1\n" unless ( grep (/what\s1/, @lines ) ); > print CHANGE "what 2\n" unless ( grep (/what\s2/, @lines ) ); > print CHANGE "what 3\n" unless ( grep (/what\s3/, @lines ) ); > print CHANGE "what 4\n" unless ( grep (/what\s4/, @lines ) ); > print CHANGE "what 5\n" unless ( grep (/what\s5/, @lines ) ); > print CHANGE "what 6\n" unless ( grep (/what\s6/, @lines ) ); > print CHANGE "what 7\n" unless ( grep (/what\s7/, @lines ) ); > print CHANGE "what $1\n" unless ( grep (/what\s([1-7])/, @lines ) );
Wags ;) David R Wagner Senior Programmer Analyst FedEx Freight 1.408.323.4225x2224 TEL 1.408.323.4449 FAX http://fedex.com/us > Cheers, > > Noah > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > > ********************************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. ********************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/