Re: Regexp delimiters

2010-12-08 Thread Jonathan Pool
> c:\>perl -wE "say $^V,$^O;$_='123456789';s§3(456)7§$1§;say" > v5.12.1MSWin32 > 1245689 My equivalent that works is: perl -wE "use utf8;my \$_='123456789';s§3(456)7§§\$1§;say;" 1245689 If I stop treating this section-sign delimiter as a bracketing delimiter, it fails: perl -wE "use utf8;m

Re: how to get those digit

2010-12-08 Thread Jim Gibson
At 12:04 PM +0800 12/9/10, bezier wrote: hi, how to get all digit from a file? the file like this: 12091025 test 11 fetches, 589 max parallel, 2.418e+06 bytes, in 60.0213 seconds 219819 mean bytes/connection 0.183268 fetches/sec, 40285.8 bytes/sec msecs/connect: 18.7797 mean, 21.868 max,

Re: Regexp delimiters

2010-12-08 Thread Jonathan Pool
> Hm, what platform and perl version? 5.8.8 and 5.12.2 on RHEL, and 5.10.0 on OS X 10.6. > c:\>perl -Mutf8 -wE >"say $^V,$^O;$_='123456789';s§3(456)7§$1§;say" > Malformed UTF-8 character (unexpected continuation byte 0xa7, > with no preceding start byte) at -e line 1. Not the same err

how to get those digit

2010-12-08 Thread bezier
hi, how to get all digit from a file? the file like this: 12091025 test 11 fetches, 589 max parallel, 2.418e+06 bytes, in 60.0213 seconds 219819 mean bytes/connection 0.183268 fetches/sec, 40285.8 bytes/sec msecs/connect: 18.7797 mean, 21.868 max, 16.3 min msecs/first-response: 7096.68 me

Re: glob files and subdirectories

2010-12-08 Thread Brian Fraser
While some people have suggested File::Find, I'd recommend File::Find::Rule[0]: > use File::Find::Rule; > my $starting_dir = 'C:/whatever'; > my @files = File::Find::Rule->name( '*.html' )->in( $starting_dir ); > say join "\n", @files; Brian. [0] http://search.cpan.org/~rclamp/File-Find-Ru

RE: glob files and subdirectories

2010-12-08 Thread Wagner, David --- Senior Programmer Analyst --- CFS
>-Original Message- >From: Noah [mailto:noah-l...@enabled.com] >Sent: Wednesday, December 08, 2010 12:42 >To: Perl Beginners >Subject: glob files and subdirectories > >Hi there, > >what is the easiest way to get all the filenames like *html in the root >directory and all subdirectories? > >

Re: glob files and subdirectories

2010-12-08 Thread Shlomi Fish
On Wednesday 08 December 2010 22:49:35 Shawn H Corey wrote: > On 10-12-08 02:41 PM, Noah wrote: > > Hi there, > > > > what is the easiest way to get all the filenames like *html in the root > > directory and all subdirectories? > > > > The glob command appears to just sit at the root directory. >

Re: glob files and subdirectories

2010-12-08 Thread Shawn H Corey
On 10-12-08 02:41 PM, Noah wrote: Hi there, what is the easiest way to get all the filenames like *html in the root directory and all subdirectories? The glob command appears to just sit at the root directory. Cheers, Noah use File::Find; See `perldoc File::Find` for details. -- Just my

Re: Regexp delimiters

2010-12-08 Thread C.DeRykus
On Dec 7, 9:38 am, p...@utilika.org (Jonathan Pool) wrote: > > Well, I have no idea why it does what it does, but I can tell you how to > > make it work: > > s¶3(456)7¶¶$1¶x; > > s§3(456)7§§$1§x; > Oops, sorry, yes there is: c:\>perl -Mutf8 -wE "say $^V,$^O;$_='123456789';s§3(456)7§$1§;say"

Re: Regexp delimiters

2010-12-08 Thread C.DeRykus
On Dec 7, 9:38 am, p...@utilika.org (Jonathan Pool) wrote: > > Well, I have no idea why it does what it does, but I can tell you how to > > make it work: > > s¶3(456)7¶¶$1¶x; > > s§3(456)7§§$1§x; Oops. yes there is: c:\>perl -Mutf8 -wE "say $^V,$^O;$_='123456789'; s§3(456)7§$1§;say" Malform

Re: Regexp delimiters

2010-12-08 Thread C.DeRykus
On Dec 7, 9:38 am, p...@utilika.org (Jonathan Pool) wrote: > > Well, I have no idea why it does what it does, but I can tell you how to > > make it work: > > s¶3(456)7¶¶$1¶x; > > s§3(456)7§§$1§x; > Hm, what platform and perl version? No errors here: c:\>perl -wE "say $^V,$^O;$_='1234567

Re: glob files and subdirectories

2010-12-08 Thread shawn wilson
Look at find2perl.

Re: glob files and subdirectories

2010-12-08 Thread Robert Wohlfarth
On Wed, Dec 8, 2010 at 1:41 PM, Noah wrote: > Hi there, > > what is the easiest way to get all the filenames like *html in the root > directory and all subdirectories? > > The glob command appears to just sit at the root directory. > Try the File::Next

glob files and subdirectories

2010-12-08 Thread Noah
Hi there, what is the easiest way to get all the filenames like *html in the root directory and all subdirectories? The glob command appears to just sit at the root directory. Cheers, Noah -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h