[OPEN-ILS-DEV] When someone's who's better at Perl than I am is bored....

LAURENT Henri-Damien henridamien.laurent at biblibre.com
Wed Sep 9 21:04:00 EDT 2009


John Craig a écrit :
> Hi Folks,
>
> Just for the heck of it (less important now with the -l flag available 
> on the osrf_ctl.sh command line), but this Perl one-liner in 
> opensrf.xml.example is okay, as far as it goes, but the resulting 
> display is confusing (it'd sure be nice to have a newline after it so 
> that the following prompt doesn't just neatly join right up with it):
>
> perl -MNet::Domain -e 'print Net::Domain::hostfqdn();'
>
> Returns (for example):
>
> root at nearly:/home/opensrf# perl -MNet::Domain -e 'print 
> Net::Domain::hostfqdn();'
> nearly.adomain-name.comroot at nearly:/home/opensrf#
>
> I'm not Perlish enough to know what it needs to do this instead:
>
> root at nearly:/home/opensrf# perl -MNet::Domain -e 'print 
> Net::Domain::hostfqdn();'
> nearly.adomain-name.com
> root at nearly:/home/opensrf#
>
> But it'd be worth it if it's not too difficult.
>

Hi,
simply print with \n at the end :
perl -MNet::Domain -e 'print Net::Domain::hostfqdn(),"\n";'
For wiw.
My 2cts.



More information about the Open-ils-dev mailing list