CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
($mon, $day,$year) = split (/.*Mon /, ``); whats the statement doing?

 



Yogesh
New User

Jun 10, 2010, 4:20 AM

Post #1 of 2 (606 views)
($mon, $day,$year) = split (/.*Mon /, ``); whats the statement doing? Can't Post

Hi All,

I am new to Perl and debugging a script written by some one else.

I came across one statement:

($mon, $day,$year) = split (/.*Mon /, `date`);

Whats this statement is doing?


Bianca
User

Jun 10, 2010, 4:51 AM

Post #2 of 2 (604 views)
Re: [Yogesh] ($mon, $day,$year) = split (/.*Mon /, ``); whats the statement doing? [In reply to] Can't Post

Hi!

The characters around 'date' are backticks: http://sial.org/howto/perl/backticks/ and runs external programms.
The split commands splits the string EXPR into a list of strings and returns that list: perldoc -f split
http://perldoc.perl.org/functions/split.html

Is this enough to understand the line?
Sorry for my english.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives