Thanks Jeff,
I got it working in the end :))
the server this will live on doesn't have DateTime.pm nstalled and i'm not sure if i'll be allowed to install it. Server guys for ya!
i modded the following at line 48:
[CODE=perl]
$line =~ s/ (\d[^\d])/0$1/g;
$line =~ s/ (\d)$/0$1/g;
$line =~ s/\s{2} /XX /g;
[/CODE]...
User Profile
Collapse
-
date format question
Hi all,
Hope someone can help, i get the date in the format of 12/12/2008
i 'd like to find out what day this is on, either a weekday/weekend. so output would be:
12/12/2008
midweek: fri 12 december
I'm also trying to do it the hard way, without the use of any modules .. i feel this will help my perl skills.
after the user has entered a date, i use the back tick operator... -
Hi KevinADC,
Sorry for my late reply and thanks for the explanation into this problem i was having.
I like the way its been explained, but will admit that so far in my perl training i haven't come across regex alternation yet, but it looks very handy.
thanks again for your help on this
best regards
g0ukiLeave a comment:
-
Nice!
Thanks KevinADC :)
I dont understand how you've made it work though?
the line: split/"\s+"|"\s+| \s+"/;
splits the line by whitespace, but 2 times?
"\s+|\s+"/; -> this tests for an 'or' option?
Would it be okay if its explained? i really want to get to grasp with perl's regex.
Thanks again
g0ukiLeave a comment:
-
Trouble getting data from a file
Hi all,
i hope you can help, I'm having some trouble getting all the data from a file, well just the date and time entries. I'll be doing operations on the data so would like to store it within variables.
My script's output is looking a bit strange...
The file is sent from a server so changing it will be difficult. Nearly all of the data are in quotes except the date and time.
First line...
No activity results to display
Show More
Leave a comment: