barrycarlyon has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Pilgrims on the Perl Monks Monastary,
A quick question regarding a split
Given:
my ($session_id, $last_action_date, $last_action_time) = $session =~ / +^(\d\d)-(\d{10})-(\d{8})$/;
Do i Have to do anything extra to get $session_id on is own, as I cant get it to display on the page, using a standard process
My belief is that the my (xxx) is an array, if so how do I split that up?
UPDATE: Sorry guys your right i copied from the other monitor wrong
Basically, i have a session which is for example 01-2006-05-19-13:00:00
so the first two digits are the session id
2006-05-19 (10 digits) is the session date
13:00:00 (8 digits) is the session time,
As the session is initially generated by Class::Date, hence - and :
So any help would be useful as I originally got the above code line from an earlier node that I authored, and the above code line was a reply
update 2: yes iut does have {} its just a fuzzy monitor, its on a laptop i just plugged it into a fuzzy monitor, and by the way I do have glasses
Update 3: Since this is being difficult, coz Im writing my own session management software, how about a way to remove characters from a $session say remove / and the :, suggestions
Yours
Bazza
2006-06-21 Retitled by holli, as per Monastery guidelines
Original title: 'A Question on assigning varibles from a big variable'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A Question on assigning variables from a big variable
by Corion (Patriarch) on Jun 20, 2006 at 12:24 UTC | |
|
Re: A Question on assigning variables from a big variable
by liverpole (Monsignor) on Jun 20, 2006 at 12:25 UTC | |
by jwkrahn (Abbot) on Jun 20, 2006 at 19:55 UTC | |
|
Re: A Question on assigning variables from a big variable
by explorer (Chaplain) on Jun 20, 2006 at 12:26 UTC | |
|
Re: A Question on assigning variables from a big variable
by johngg (Canon) on Jun 20, 2006 at 12:50 UTC |