Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: handling files using regular expression

by ww (Archbishop)
on Jun 28, 2013 at 13:58 UTC ( #1041261=note: print w/replies, xml ) Need Help??

in reply to handling files using regular expression

What the heck does " the first occurrence of all the continuous digits" mean?

That aside, your attempt to capture the digits won't work as is; you need something like:

if ( $_ =~ m/:(\d+)/ ) { my $name = $1; print OFILE "$name\n"; }

And, of couse, it would be a good idea to close the OFILE as well as your input... and to heed -- as mentioned before -- the advice your last SOPW elicited.

Downvoted this node.

If you didn't program your executable by toggling in binary, it wasn't really programming!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1041261]
[james28909]: cant seem to make it look in linux module path for
[james28909]: no matter how i prepare the paths. oh well. looks like ill just have to start wsl perl from scratch
[Corion]: james28909: You can get a list of all modules on your Windows Perl via the autobundle command in the cpan shell. But that likely lists many more modules than you actually want. I recommend a clear separation and installing modules on ...
[Corion]: ... both Perls separately. I use cpanfiles or Makefile.PL for that - listing all modules for an application there allows me to install them via cpanm . or cpan . automatically without any further interaction

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2018-05-23 17:21 GMT
Find Nodes?
    Voting Booth?