> -----Original Message-----
> From: Adam Vardy [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 10:26 PM
> To: [EMAIL PROTECTED]
> Subject: From tutorial
> 
> 
> Can someone help please.  I'm learning from scratch.  What is this?
> 
> $_='My email address is <[EMAIL PROTECTED]>.';
> 
> /(<.*>)/i;
> 
> print "Found it ! $1\n";
> 
> I can only identify one command here. Print.  How does this 'program'
> run?

If this is from a tutorial, you need to find another tutorial :)

   /(<.*>)/i;

1. Capturing text without checking for success or failure ($1 is not
changed on no match, so it retains it's previous value).

2. Useless use of /i

The last two lines would be better written as:

  /(<.*>)/ && print "Found it ! $1\n";

or, more readable:

  print "Found it ! $1\n" if /(<.*>)/;

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to