LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-11-2004, 09:44 PM   #1
Echo Kilo
Member
 
Registered: Jul 2004
Distribution: Ubuntu - Debian Based
Posts: 242

Rep: Reputation: 30
$return_value


Hello, I'm learning Perl. Is this the write place?

If so, what is the meaning of $return_value below?

#!/usr/bin/perl
$return_value = system("df");
print "System returned $return_value\n";

Last edited by Echo Kilo; 12-18-2004 at 02:22 PM.
 
Old 12-12-2004, 04:43 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
it's the exit code of the system call. 0 = success > 0 = error or some sort normally

Last edited by acid_kewpie; 12-12-2004 at 05:07 PM.
 
Old 12-12-2004, 05:02 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 12-12-2004, 11:06 PM   #4
Echo Kilo
Member
 
Registered: Jul 2004
Distribution: Ubuntu - Debian Based
Posts: 242

Original Poster
Rep: Reputation: 30
HI again, I was wondering if I could get some elaboration on its meaning and purpose.
 
Old 12-13-2004, 03:55 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
not sure what else there is to say.... it runs a shell command through system() and then tells you the exit code...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I check to see if a script is running? slick_willie Programming 13 03-16-2007 10:18 AM
Script check Echo Kilo Programming 1 12-12-2004 12:55 PM
dynamic ip check script? jeru Debian 4 11-30-2004 09:48 AM
Script to check groups quack322 Programming 1 08-15-2004 03:16 AM
Ip check script, help me? wiggywag Programming 3 01-13-2004 01:58 AM


All times are GMT -5. The time now is 08:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration