in reply to Re: Backticks without shell
in thread Backticks without shell

Thanks! I'll probably upgrade just to use this.

Does anyone know why backticks are an operator in the first place? It seems like the syntax is broken compared with system, because it's a loss of functionality. Wouldn't having stdout( ... ) as a complement to system( ... ) make more sense?

Replies are listed 'Best First'.
Re: Re: Re: Backticks without shell
by BUU (Prior) on Jan 21, 2004 at 10:22 UTC
    My guess (No informed ideas here!) that they're a legacy feature from trying to support bash scripters and their backticks as well as it's just a quick simple and above all, lazy way to get the output of a command.
    my $data = `cmd`;
    Is vastly preferable to
    open FH,'cmd |'; my $data; $data.=$_ while(<FH>);
    (or something of that nature).