[TriLUG] rusty perl question

William Sutton william at trilug.org
Wed May 9 12:01:18 EDT 2007


do_this() if $line =~ m/^=+$/;

-or-

if ($line =~ m/^=+$/)
{
    # do stuff
}

-- 
William Sutton


On Wed, 9 May 2007, Greg Brown wrote:

> I'd like to match this line as a trigger:
> 
> ==============
> 
> that is all that is on the line.
> 
> I'm so rusty even this basic pattern match is thwarting me.  I'm embarrased
> to ask but what is the syntax for:
> 
> if $line equals that line I listed above {
> 
>                do this and that;
> 
> }
> 
> :(
> 



More information about the TriLUG mailing list