shelling out? - uname

Nicholas Clark nick at ccl4.org
Fri Dec 8 14:40:51 GMT 2006


On Fri, Dec 08, 2006 at 02:33:41PM -0000, Russ Hogge wrote:
> 
> Kaoru said:
> > The perl special var $^O will return your operating system, eg:
> >
> > pixel29% perl -e 'print $^O, "\n"'
> > linux
> 
> Exelent, I knew there had to be an easy way...

Until someone lies:

$ perl -le '$^O = "emacs"; print $^O'
emacs

On Fri, Dec 08, 2006 at 02:28:13PM +0000, Stephen Cardie wrote:

> POSIX::uname()

Seems a much better plan :-)

Nicholas Clark


More information about the london.pm mailing list