Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
"between" function equivalent in Perl?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Tad McClellan, post: 4742252"] You should always enable warnings when developing Perl code! Did you print out $mystring to see what it contains at this point? That code has the same effect as: $mystring = 'zzz blea=blech @'; (only it doesn't do "busy work" and then discard the results) That is m// in a scalar context, it returns "true" or "false". (which might be 1 or 0, but could be something else.) That is m// in a list context, it returns all of the "memories" if the match succeeds. if $mystring contains the "3" character, then: ($mymatch) = $mystring =~ /(3)/; Please see the Posting Guidelines that are posted here frequently. It suggests you use warnings. It suggests you post real code. We could save a lot of round-and-round if you had just done it right the first time... If you don't understand something in the "Context" section of perldata.pod, then post that part here, and we'll try helping you to understand it. It is unclear what you've already seen, and it would be a waste of time doing all here if what is in the std docs is enough for you. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
"between" function equivalent in Perl?
Top