You are here:
Hi, Glad the code worked out of the box-- I didn't test it at all. The 'sort by value' is done by using the number comparison operator <=>. There is a little nested comparison happening as it sorts
Though not tested, I would do it this way since you said the file isn't very large: #!/usr/bin/perl # get the file first: open (FILE, 'z.txt'); @whole_file = <FILE>; # assign it to an array
Hi Petar, When you do that, perl things you're ending the regular expression at </ and then you're giving it flags of b> and starting a new command of /ig. Which is of course, invalid syntax. The
Hi Luis, You could do something like this: $myMonths['January'] = "Januar"; $myMonths['February'] = "Februar"; $myMonths['March'] = "Mars"; $myMonths['April'] = "April"; $myMonths['May'] = "Mai"
Jerod - After you get the basics of the language down, I would say your next course of action should be a good book - I recommend PHP & MySQL Web Development, the latest version (Not sure which version

©2009 About.com, a part of The New York Times Company. All rights reserved.