in reply to system call: Unix system call result into a variable

You can use the back ticks or qx() like so:

$error_string = qx(tail -n 10 $ERRLOG);
You can also get your result in an array:

@error_array = qx(tail -n 10 $ERRLOG);
Hope that helps ;)

UPDATE: Removed the double-quotes. Thanks quester

Replies are listed 'Best First'.
Re^2: system call: Unix system call result into a variable
by quester (Vicar) on Jul 18, 2007 at 07:52 UTC
    Although without the extra quotes, since qx() itself is one of the "quote-like operators" described in perlop:
    @error_array = qx(tail -n 10 $ERRLOG);