Personally, i prefer

$date="$month-$year";

You could also use

$date=join '-', $month, $year;

but that's a little more awkward.

-----Original Message-----
From: John Edwards [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 9:46 AM
To: 'shweta shah'; [EMAIL PROTECTED]
Subject: RE: Concatenation


Use a . to concatenate strings:

$year = "01";
$month = "06";
$date = $month . "-" . $year;
print $date;

HTH

John

-----Original Message-----
From: shweta shah [mailto:[EMAIL PROTECTED]]
Sent: 24 July 2001 15:44
To: [EMAIL PROTECTED]
Subject: Concatenation


Hi friends,
      Is there a way to concatenate 2 arguments in one string using 
Perl like for eg $year and $month where
$year=01
$month=06
and I want the result as a string 06-01 using Perl

Thankx
Shweta



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------Confidentiality--------------------------.
This E-mail is confidential.  It should not be read, copied, disclosed or
used by any person other than the intended recipient.  Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful.  If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to