Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Regex for matching dotted numbers

by AppleFritter (Vicar)
on Jul 21, 2014 at 11:22 UTC ( [id://1094458]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regex for matching dotted numbers
in thread Regex for matching dotted numbers

Please don't make substantial changes to your original posts in a way that makes answers you already received not make sense anymore. Instead, add an addendum to your post to clarify.

Now, that said, what exactly is it you want to do now? You've got a list of version numbers and a version you want to match against them, and you want to run a particular script unless that version is on your list. So why not simply do exactly that in Perl?

foreach (@versions) { unless($_ eq $version) { runscript(...); } }

Or, more idiomatically:

runscript(...) foreach (grep { $_ ne $version } @versions);

Replies are listed 'Best First'.
Re^4: Regex for matching dotted numbers
by techman2006 (Beadle) on Jul 21, 2014 at 11:45 UTC

    Sorry for updating the question at random. By the time I went clear on my problem statement there was an reply.

    Basically I am looking for a generic solution that if the version string matches with the version I am looking then run a flow in the script else skip it.

    So having a look up array will not help as there can any version in that format in future I need to update the array every time. That I don't want.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-24 21:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found