Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Find Number in String then Ignore Characters proceeding

by temporal (Pilgrim)
on May 29, 2012 at 21:33 UTC ( #973132=note: print w/replies, xml ) Need Help??

in reply to Find Number in String then Ignore Characters proceeding

A little more legible (if not as elegant) version of what the previous post is doing:
#! perl my $str = '.,a..A,,C..+4ACGTG.,-2TG,,...,a.'; print replace($str); sub replace { my $str = shift; if ($str =~ m/([+-])(\d*)/) { $str =~ s/\Q$1\E$2.{$2}//; return replace($str); } return $str; }

Strange things are afoot at the Circle-K.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://973132]
[stevieb]: yeah digital potentiometer
[hippo]: Sounds fun. Good luck with it all.
[stevieb]: Thank you. I've got nearly all of it polished up, and have learned a boat load of things through the process

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (13)
As of 2017-01-20 16:59 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (176 votes). Check out past polls.