Re: print matching elements of a list
From: Walter Roberson (roberson_at_ibd.nrc-cnrc.gc.ca)
Date: 02/01/04
- Next message: Alan J. Flavell: "Re: can't find cgi-bin"
- Previous message: Matt Garrish: "Re: Perl For Amateur Computer Programmers"
- In reply to:(deleted message) starwars: "print matching elements of a list"
- Next in thread: kj: "Re: print matching elements of a list"
- Reply: kj: "Re: print matching elements of a list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 1 Feb 2004 00:51:56 GMT
In article <d7f4b71b2d93f415589ece825b22bafd@tatooine.homelinux.net>,
starwars <nobody@tatooine.homelinux.net> wrote:
:I want to print x, if a $var matches any of the elements of a list.
:How do I write that?
Is that matches as in a regular expression, or is that matches
as in equality?
If it is regular expressions, then
perldoc -q "How do I efficiently match many regular expressions at once?"
to get the answer from the perl faq.
If it is equality, then
perldoc -q "How can I tell whether a certain element is contained in a list or array?
for a discussion of several techniques from the perl faq.
-- Contents: 100% recycled post-consumer statements.
- Next message: Alan J. Flavell: "Re: can't find cgi-bin"
- Previous message: Matt Garrish: "Re: Perl For Amateur Computer Programmers"
- In reply to:(deleted message) starwars: "print matching elements of a list"
- Next in thread: kj: "Re: print matching elements of a list"
- Reply: kj: "Re: print matching elements of a list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|