perl question

Russell Power rjpower at washington.edu
Sun Feb 27 19:27:34 PST 2000


Well, if everything is seperated by new-lines, then you can just check with
/lin\s/ - where \s signals a whitespace character.  If anybody knows this is
wrong, please come forth.  My regular expression knowledge could be waaay
off.

Also - for a quick perl tutorial that I like go to:
http://agora.leeds.ac.uk/Perl/start.html

Hope that helps,

--Russell





----- Original Message -----
From: "Greg Daly" <gdaly at u.washington.edu>
To: "UW Linux Group" <linux at u.washington.edu>
Sent: Sunday, February 27, 2000 7:08 PM
Subject: perl question


> hey all,
> not explicitly linux, but close. i'm trying to match occurences of a
> string in perl. problem is, i only want occurences of that string
> specifically to ring a true. example, say i have this list:
>
> linux
> linus
>
> $input=~/lin/  will give me a TRUE, even though I only want it to ring
> true IFF there exists an entry named 'lin'.
>
> see what i mean? any suggestions? is there a switch i don't know about?
> thanks,
> -greg
>
>
>



More information about the Linux mailing list