shelling out? - uname
Luke Ross
luke at lukeross.name
Fri Dec 8 14:15:41 GMT 2006
Hi,
On Fri, Dec 08, 2006 at 02:02:02PM -0000, Russ Hogge wrote:
>
> Is there a good method of returning uname within perl. I need to test if
> my script is running on Linux or Solaris, and suspect that there is a
> module that would tell me this information is a sane manner.
>
> Clearly I could just type:
> chomp($platform = `/usr/bin/uname`);
>
> But this strikes me as poor.
>
> Any thoughts?
How about looking at $^O - then you don't even need a module :-)
Luke
--
Go mad this weekend: buy some beef! (advert at a supermarket)
More information about the london.pm
mailing list