You are here:

Perl/PHP

Recent Answers

2009-11-20 Perl & CGI - Perl script - combine arrays/create new array based on header:

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

2009-11-19 Perl & CGI - Perl script - combine arrays/create new array based on header:

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

2009-11-17 Perl & CGI - find and replace:

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

2009-11-14 PHP5 - convert to Norwegian date format...:

Hi Luis, You could do something like this: $myMonths['January'] = "Januar"; $myMonths['February'] = "Februar"; $myMonths['March'] = "Mars"; $myMonths['April'] = "April"; $myMonths['May'] = "Mai"

2009-11-13 PHP5 - Are there any intermediate tutorials?:

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

Categories

Browse Alphabetically

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