Re: Help needed for perl rookie
From: GRLCOPM (grlcopm_at_pacbell.net)
Date: 12/27/04
- Next message: John Fields: "Re: Is zero even or odd?"
- Previous message: byoukstetter_at_hotmail.com: "Perl CGI script using Win::ODBC module - failed login on"
- In reply to: ioneabu_at_yahoo.com: "Re: Help needed for perl rookie"
- Next in thread: Jim Gibson: "Re: Help needed for perl rookie"
- Reply: Jim Gibson: "Re: Help needed for perl rookie"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 27 Dec 2004 22:29:57 GMT
> From: ioneabu@yahoo.com
> Organization: http://groups.google.com
> Newsgroups: comp.lang.perl.misc
> Date: 27 Dec 2004 14:17:37 -0800
> Subject: Re: Help needed for perl rookie
>
>
> looks like you are replacing the spaces after the numbers with a '|'
> and removing the single quotes.
>
> s/(\d+)\s/$1|/g;
> s/'//g;
>
Yes, that is how I have changed the format of the data file. Replaced the
spaces with | and removed the single quotes from the last item on the line.
Can someone please explain what the the following line of code does and what
the replacement would be?
if (($acc,$day,$dayacc,$uri) = ($line =~ /^(\d+) (\d+) (\d+) '(\S+)'$/)) {
Thanks
Patrick
- Next message: John Fields: "Re: Is zero even or odd?"
- Previous message: byoukstetter_at_hotmail.com: "Perl CGI script using Win::ODBC module - failed login on"
- In reply to: ioneabu_at_yahoo.com: "Re: Help needed for perl rookie"
- Next in thread: Jim Gibson: "Re: Help needed for perl rookie"
- Reply: Jim Gibson: "Re: Help needed for perl rookie"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|