Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to match the dot using the following regular expression
#!/volume/perl/bin/perl use warnings; use strict; use DateTime::Duration; my $tim = "01:00:01.004"; $tim =~ s/:/./g; print "new time is $tim"; my @outputlist = split /./, $tim; print "$outputlist[0]\n";
It shows the following error . let me know how to split using dot
Use of uninitialized value in concatenation (.) or string at ./temp-ip2.pl line 11. new time is 01.00.01.004
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matching dot using regexp
by Discipulus (Canon) on Oct 09, 2017 at 18:14 UTC | |
|
Re: Matching dot using regexp
by LanX (Saint) on Oct 09, 2017 at 18:12 UTC | |
|
Re: Matching dot using regexp
by huck (Prior) on Oct 09, 2017 at 18:46 UTC | |
|
Re: Matching dot using regexp
by Laurent_R (Canon) on Oct 09, 2017 at 18:42 UTC | |
|
Re: Matching dot using regexp
by Marshall (Canon) on Oct 09, 2017 at 18:27 UTC | |
|
Re: Matching dot using regexp
by Anonymous Monk on Oct 10, 2017 at 07:35 UTC | |
by AnomalousMonk (Archbishop) on Oct 10, 2017 at 08:43 UTC | |
by LanX (Saint) on Oct 10, 2017 at 09:30 UTC | |
by soonix (Chancellor) on Oct 10, 2017 at 10:19 UTC | |
by AnomalousMonk (Archbishop) on Oct 10, 2017 at 10:46 UTC | |
by AnomalousMonk (Archbishop) on Oct 10, 2017 at 10:15 UTC | |
by Anonymous Monk on Oct 10, 2017 at 11:10 UTC |