in reply to (OT) command for finding out which distribution of Linux is being used

cat /proc/version usually gives you more information than uname -a. If you use the system builtin to call these commands from perl, remember that it returns true on failure and make sure you use the LIST form or at least avoid shell-metacharacters and shell-pattern-matching-characters in the string that you pass to system.

Here is a shell session on my system:

$ cat /proc/version Linux version 2.6.11.4-21.14-default (geeko@buildhost) (gcc version 3. +3.5 20050117 (prerelease) (SUSE Linux)) #1 Thu Aug 24 09:51:41 UTC 20 +06 $ echo /proc/vers* /proc/version $ cat /proc/vers* Linux version 2.6.11.4-21.14-default (geeko@buildhost) (gcc version 3. +3.5 20050117 (prerelease) (SUSE Linux)) #1 Thu Aug 24 09:51:41 UTC 20 +06 $ uname -a Linux charm 2.6.11.4-21.14-default #1 Thu Aug 24 09:51:41 UTC 2006 i68 +6 i686 i386 GNU/Linux $ perl -e '@args=qw(cat /proc/version); system(@args)' Linux version 2.6.11.4-21.14-default (geeko@buildhost) (gcc version 3. +3.5 20050117 (prerelease) (SUSE Linux)) #1 Thu Aug 24 09:51:41 UTC 20 +06 $ perl -e '@args=qw(cat /proc/vers*); system(@args)' cat: /proc/vers*: No such file or directory $ perl -e '@args=qw(uname -a); system(@args)' Linux charm 2.6.11.4-21.14-default #1 Thu Aug 24 09:51:41 UTC 2006 i68 +6 i686 i386 GNU/Linux $ perl -e '@args=qw(uname -a;echo do-something-evil); system(@args)' uname: invalid option -- ; Try `uname --help' for more information. $ perl -e 'system q(uname -a;echo do-something-evil)' Linux charm 2.6.11.4-21.14-default #1 Thu Aug 24 09:51:41 UTC 2006 i68 +6 i686 i386 GNU/Linux do-something-evil
I think most monks prefer to field non-perl questions in the Chatterbox.

Update: Added <readmore>