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="Alexandra, post: 4742230"] I will play with this because I do want to understand all the different ways to accomplish the same things (in some cases). I have that book open right now on my desk and after reading this, I looked down to see it was already open to p.69 (not a lie). Out of curiosity, I was trying to get my "wrong" expression to evaluate to 2 or 0 or any other number besides 1. But I couldn't do it. I was attempting this by adding in more elements in the original search string that would match the re, but I still received a 1. $mystring = ('xxx blah=bleh @', 'yyy bloh=bluh @', 'zzz blea=blech @'); $mymatch = $mystring =~ /=(.*?)\s/; #for example (one of the correct solutions previously provided) returns 1 ($mymatch) = $mystring =~ /=(.*?)\s/; #returns 'blech', the last value to match in the string Would you know how to get it to return 3 instead of 1? (I know, I've got to read and keep at this to understand lists and contexts. The advanced and even not-advanced programmers reading this must be laughing at me but if I can learn it then its worth it.) Alexandra [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
"between" function equivalent in Perl?
Top