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

Code Source

Yours
Bazza

Barry Carlyon barry@barrycarlyon.co.uk

2006-06-21 Retitled by holli, as per Monastery guidelines
Original title: 'A Question on assigning varibles from a big variable'


In reply to A Question on assigning variables from a big variable by barrycarlyon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.