Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Expire date of domain

by Lucky001 (Initiate)
on Oct 13, 2014 at 13:54 UTC ( #1103624=perlquestion: print w/replies, xml ) Need Help??

Lucky001 has asked for the wisdom of the Perl Monks concerning the following question:

perl -MNet::Domain::ExpireDate -e '$x=expire_date('');print $x;' ""Why its not working"

Replies are listed 'Best First'.
Re: Expire date of domain
by Eily (Monsignor) on Oct 13, 2014 at 14:27 UTC

    perl -MNet::Domain::ExpireDate -e '$x=expire_date('');print $x;' ""Why its not working"
    You have single quotes both as script delimiter and inside the script:
    perl -e 'print ('');' -> abccom
    You are calling "expire_date" with parameter abccom.

Re: Expire date of domain
by blue_cowdawg (Monsignor) on Oct 13, 2014 at 14:14 UTC

    Seems a quick RTFM is in order here. Please note the following:

    $expiration_obj = expire_date( '' ); $expiration_str = expire_date( '', '%Y-%m-%d' ); $expiration_obj = expdate_int( $whois_text, 'com' ); $expiration_str = expdate_fmt( $whois_text, 'ru', '%Y-%m-%d' +);
    This works fine:
    # perl -MNet::Domain::ExpireDate -e 'print expire_date("" +,"%Y-%m-%d"),"\n"' 2021-05-03

    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; Blog: Warning: No political correctness allowed.
Re: Expire date of domain
by choroba (Cardinal) on Oct 13, 2014 at 13:58 UTC
    Hi Lucky001, welcome to the Monastery!

    What do you mean by "not working?" Is there no output, or do you get output different to your expectations (in such a case, what did you expect)? Or is there an error message? What does it say?

    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1103624]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2023-05-30 16:32 GMT
Find Nodes?
    Voting Booth?

    No recent polls found