develooper Front page | perl.beginners | Postings from December 2002

query a ph nameserver plus backtick question

Thread Next
From:
bengleto
Date:
December 2, 2002 12:43
Subject:
query a ph nameserver plus backtick question
Message ID:
H0004c810f2f4498.1038861750.seurat.artisan.calpoly.edu@MHS
Hello,

I'm on a unix system and I want to query a ph nameserver to get some 
information.  I know that I can have unix do it for me with backticks

$name = `ph email = address@calpoly.edu return name`;

this will return text to $name 

----------------------------------------
     name: Cinco, Aaron Lou Torres
----------------------------------------
     name: Cuvelier, Carrie Jean
----------------------------------------
     name: Dant, Gregory Charles
----------------------------------------
     name: Erdos, Jason A.
----------------------------------------

....

this is exactly the data I want, a simple regex will get me the names I 
need.

  So I basically have two questions...

Can I query the nameserver from the script directly instead of unix 
doing the work with backticks?


Are backticks bad, and if so what are the alternatives if I need to 
return information to a variable?


-brian


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About