yoda54 has asked for the wisdom of the Perl Monks concerning the following question:
Who won't my lexicals reset?
Thanks
#!/usr/bin/perl use strict; use warnings; while (<DATA>) { $_ =~ /(\d\d):(\d\d):(\d\d)/; my $hours = $1; my $minutes = $2; my $seconds = $3; print "$hours,$minutes,$seconds\n" } __DATA__ 01:23:45 06:54;32 23;45:16
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular expression and lexical variables
by davido (Cardinal) on Apr 17, 2011 at 08:23 UTC | |
|
Re: Regular expression and lexical variables
by wfsp (Abbot) on Apr 17, 2011 at 07:22 UTC | |
|
Re: Regular expression and lexical variables
by ikegami (Patriarch) on Apr 17, 2011 at 16:53 UTC | |
|
Re: Regular expression and lexical variables
by anonymized user 468275 (Curate) on Apr 18, 2011 at 10:28 UTC |