CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Help! Stuck on methods to count file size.

 



Jessica80
New User

Oct 9, 2013, 11:11 PM

Post #1 of 6 (674 views)
Help! Stuck on methods to count file size. Can't Post

 


(This post was edited by Jessica80 on Oct 15, 2013, 3:13 PM)


BillKSmith
Veteran

Oct 10, 2013, 12:21 PM

Post #2 of 6 (658 views)
Re: [Jessica80] Help! Stuck on methods to count file size. [In reply to] Can't Post

We really cannot help you with the info you have posted. Your code did not produce the sample output - it does not even come close to compiling.

I do not understand how your sample output has anything to do with your three requirements.


I do believe that your first input field is a julian day. You need to know what month this occurs in. The best way to do this is with a module that takes care of leap year and other details.

Your could write a crud version something like this:

Code
sub Julian2month { 
my $month
= $_ < 32 ? 'Jan'
: $_ < 60 ? 'Feb'
: $_ < 91 ? 'Mar'
: $_ < 121 ? 'Apr'
: 'Month Unknown'
;
return $month;
}

Good Luck,
Bill


Jessica80
New User

Oct 10, 2013, 1:53 PM

Post #3 of 6 (655 views)
Re: [BillKSmith] Help! Stuck on methods to count file size. [In reply to] Can't Post

Bill, I'll try your suggestion, it's really helpful! Please keep providing me the hints while I am working on it. Really appreciated!


2teez
Novice

Oct 10, 2013, 2:49 PM

Post #4 of 6 (652 views)
Re: [Jessica80] Help! Stuck on methods to count file size. [In reply to] Can't Post

Hi Jessica80,

I think is polite to let people know that you have posted this same question on other Perl Forum. Except you are not the same person with the name id [haimei] on Perlmonks with the same question title
http://www.perlmonks.org/?node_id=1057681

The reason for this is that people can know what has been suggested and where and what to help you with.

#Update
Check update on the thread here http://www.perlmonks.org/?node_id=1057744


(This post was edited by 2teez on Oct 10, 2013, 2:53 PM)


Laurent_R
Veteran / Moderator

Oct 10, 2013, 3:25 PM

Post #5 of 6 (647 views)
Re: [2teez] Help! Stuck on methods to count file size. [In reply to] Can't Post

I definitely agree with 2teez, but just an additional question: why the hell would you want to work with the Julian calendar in 2013? AFAIK, absolutely nobody uses Julian Calendar nowadays (except the Orthodox Church for the purpose of calculating the dates of purely religious events). Are you sure that you don't want to use actually the Gregorian Calendar (our current calendar)?


BillKSmith
Veteran

Oct 10, 2013, 8:13 PM

Post #6 of 6 (640 views)
Re: [Laurent_R] Help! Stuck on methods to count file size. [In reply to] Can't Post

Quote from Wikipedia article "Julian Day":


Quote
The term "Julian date" may also refer, outside of astronomy, to the day-of-year number (more properly, the ordinal date) in the Gregorian calendar, especially in computer programming, the military and the food industry

Good Luck,
Bill

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives