Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Checking a path

by bellaire (Hermit)
on Nov 18, 2009 at 17:17 UTC ( #807960=note: print w/replies, xml ) Need Help??


in reply to Checking a path

Using substr like you have in your example probably is the most efficient way to go about this. Usually, though, this kind of micro-efficiency isn't something you need to worry about unless you've done profiling and you know that you have good reason to seek an improvement.

Replies are listed 'Best First'.
Re^2: Checking a path
by AnomalousMonk (Bishop) on Nov 18, 2009 at 17:46 UTC
    Note that for more concision the last character of the string can be obtained by:
    substr($TestStrings{$TestPatternKey}, -1)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2019-10-22 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?