BilgeRat
BilgeRat

Reputation: 1

Perl with backticks - I do not understand the operation inside the backticks

I'm a perl novice. What's happening inside the backticks of the following?

$selfext and $banner are previously defined. The statement below is executed in Linux and I don't understand where the banner function is coming from? When I print $_ I get a null string.

$_=`banner $selfext $banner`;

Upvotes: 0

Views: 209

Answers (1)

Steffen Ullrich
Steffen Ullrich

Reputation: 123320

This is invoking a shell which is executing the banner command. banner is a normal UNIX program like uniq, sort or even perl itself, i.e. this is not some perl function. It is not installed on all systems though (same as with perl) and therefore the execution might fail. For more see man banner.

Upvotes: 2

Related Questions