codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Date::Simple and Perl in general.  djking at 06:00 on Thursday, November 30, 2006
 

Maybe I just don't know much about PERL, but I can't get this to work.

use Date::Simple ( 'date', 'today' );

$mydate = "2006-5-10";
$simpdate = date( $mydate );

But if you write date( '2006-5-10' ); it works perfectly. But I'm passing a date from a file that I don't previously know. I had to resort to doing this.

$mydate = "2006-5-10";
$simpdate = date( split( /-/,$mydate ) );

Now does anybody know if maybe I'm just supposed to use some language semantic to pass the string like putting a upside down dollar sign or a happy face in front of the variable. Something that I would never be able to guess in a million years, but PERL seems to think that's the way it supposed to work. There is more than one way to do it right, but just as many ways to do it wrong.

  Re: Date::Simple and Perl in general.  Unencoded.net at 17:00 on Thursday, November 30, 2006
 

with encoding in file evrything is OK?

  Re: Date::Simple and Perl in general.  djking at 05:06 on Friday, December 01, 2006
 

I don't really understand the question.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Lost part 2!!!
•  Re: Lost!!!
•  Re: hehe
•  Comparing Arrays
•  Re: for java layour
•  Re: Trying to create a C++ Object Oriented game
•  Re: Date::Simple and Perl in general.
•  Re: Sending E-MAIL
•  how to get form values from within web user controls?


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2006