On Tue, 2008-09-16 at 08:28 -0700, cancer wrote:
> Hi,
> I am using Perl on Linux server. I m writing a code which will tell
> us the Linux distro with version. For this the command is
>
> cat /etc/issue
>
> which is common for all the distributions of linux. But the output
> varies for different distributions.
>
> For e.g.
>
> SUSE
>
> Welcome to openSUSE 11.0 (X86-64) - Kernel \r (\l).
>
> REDHAT
>
> Red Hat Enterprise Linux Server release 5 (Tikanga)
>
> I am able to save the output in a string. Now I want a code or
> function which will give me only the number from the string.
>
>
my @numbers = split /\D+/;
--
Just my 0.00000002 million dollars worth,
Shawn
"Where there's duct tape, there's hope."
Cross Time Cafe
"Perl is the duct tape of the Internet."
Hassan Schroeder, Sun's first webmaster
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/