Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Expire date of domain

by Lucky001 (Initiate)
on Oct 13, 2014 at 13:54 UTC ( [id://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('abc.com');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('abc.com');print $x;' ""Why its not working"
    You have single quotes both as script delimiter and inside the script:
    perl -e 'print ('acb.com');' -> 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( 'microsoft.com' ); $expiration_str = expire_date( 'microsoft.com', '%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("microsoft.com" +,"%Y-%m-%d"),"\n"' 2021-05-03


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; Blog: http://blog.berghold.net 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found