[32931] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4208 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 6 00:09:31 2014

Date: Mon, 5 May 2014 21:09:03 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 5 May 2014     Volume: 11 Number: 4208

Today's topics:
        grepping a list of patterns in a larger list <ukunapul@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 5 May 2014 20:17:05 -0700 (PDT)
From: Udaykumar Kunapuli <ukunapul@gmail.com>
Subject: grepping a list of patterns in a larger list
Message-Id: <160a43d6-9d36-490b-ab8a-9f185b5c8513@googlegroups.com>

Hi,

I have 2 lists. 

As an example:
@list1 = (1234, 345638, 3535, 93756387);
@list2 = ("375539 Linux DONE", "1234 Linux DONE", "345638 Linux EXIT", "6384643 Linux RUN", "45234 Linux RUN", "3535 Linux DONE", "93756387 Linux DONE");

I need to print out the list of elements in list2 where the first number part of the string does NOT exist in list1.

I need to get a list3 from list2 where list3 looks like below
@list3 = ("375539 Linux DONE", "6384643 Linux RUN", "45234 Linux RUN");

None of the above first number parts in list3 exist in list1, which is how I want it to be. 

What would be the simplest way of doing this in Perl?

Thanks,
Uday


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 4208
***************************************


home help back first fref pref prev next nref lref last post