"John W. Krahn" wrote:

> "R. Joseph Newton" wrote:
> >
> > from your original post raised a red flag for me:
> > > $var =~ /.*? \(.*\) (.*?) \(.*?\)/;
> > I saw it, and wondered "Well, what is he doing with it?".  The matching function
> > is intended to return a true value on success, and that value is assigned to your
> > blandly-named $var, yet it is never used.
>
> No, that value is NOT assigned to $var.  The expression is in a void
> context so the result of the expression is not assigned to anything.
> You need to use the assignment operator '=' if you want to assign the
> result of the expression to some variable.
>
> > Try instead:
> > if  ($var =~ /.*? \(.*\) (.*?) \(.*?\)/;) ) {
>                                          ^
> That semicolon is a syntax error.  It won't compile.

Thanks John,

I noticed that on first scan, hence the red flag, and then I misread it while pasting
it in.

Joseph


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

Reply via email to