Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Re: Re: Re: Re: Re: checking the end of line

by dimmesdale (Friar)
on Jul 20, 2002 at 19:45 UTC ( #183653=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Re: Re: checking the end of line
in thread checking the end of line

Syntax error becuase of )[

With the parens around JUST the regex it works (but returns a 1).

Assigning the results to an array or using the $1 variable, however, would get around this if the user is having any problems ...

Has anyone else been having problems with PM? I checked my firewall, and it seems that the banners up top keep 'timing-out', so the whole page takes forever to load.


Comment on Re: Re: Re: Re: Re: Re: Re: checking the end of line
Download Code
Re: Re: Re: Re: Re: Re: Re: Re: checking the end of line
by I0 (Priest) on Jul 20, 2002 at 22:13 UTC
    If you're getting a syntax error, perhaps you typed it in wrong.

    Perhaps you meant
    if($path =~ /(\d+)$/ == 0) { print "No number found\n"; } else { print "number is $1\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://183653]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-12-28 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (180 votes), past polls