JayBonci has asked for the wisdom of the Perl Monks concerning the following question:
Works fine. But this:#!/usr/bin/perl -w use strict; use Date::Calc qw(Add_Delta_Days); my (undef, undef, undef, $day, $month,$year) = localtime(); $year+=1900; $month+=1; ($year,$month,$day) = Add_Delta_Days($year,$month,$day, -3); print join("-", $year,$month,$day)
Doesn't work correctly. It throws a usage warning. (Keep in mind this throws the error even if I add the qw symbol import). Perhaps, I'm wrong, but I thought that specifying the scope with ModuleName->FunctionName didn't call the function any differently or with any different parameters.#!/usr/bin/perl -w use strict; use Date::Calc; my (undef, undef, undef, $day, $month,$year) = localtime(); $year+=1900; $month+=1; ($year,$month,$day) = Date::Calc->Add_Delta_Days($year,$month,$day, -3 +); print join("-", $year,$month,$day)
|
|---|