in reply to Pipe and extract

In your case, you wont get array as output of ``(backticks), you would get a string(scalar). Assuming 'uptime' command in UNIX.
you have to read manuals perlre, perlretut to know about perl regular expressions, I will not put the code here.
UPDATE
changed my node according to Corion reply. Thanks Corion.

Vivek
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.

Replies are listed 'Best First'.
Re^2: Pipe and extract
by Corion (Patriarch) on Feb 19, 2009 at 08:09 UTC

    That's wrong. When you use an array on the left hand side of an assignment for backticks ("list context"), it returns a list, not a single string:

    perl -le "my @list = `dir`; chomp @list; print qq([$_]) for @list"