so, i'm having to learn perl while at work, right now. good fun.
Nice, I like perl, even if it does feel somewhat hackish in some places. But it's far less hackish than C#, so what can I say? :)
Perl is fun, although I'm having some issues with mutlidimensional arrays :\
If you're interested, you can make a perl AIM bot in practically three lines of code using Net::Oscar from CPAN. It's a nice project for learning the language.
I don't want to start a flame war, or giant discussion, but Perl vs PHP? Pros, Cons?
I find Perl better for processing text, and for writing quick and dirty scripts. It has a lot of modules built, distributed by CPAN, which are generally quite powerful.
I find PHP better small-to-medium-sized Web sites. It tends to be cleaner, but could also take awhile to write. It also has modules, via PEAR, but I've never used those.
Quote from: iago on June 11, 2008, 03:36:56 PM
I find Perl better for processing text, and for writing quick and dirty scripts. It has a lot of modules built, distributed by CPAN, which are generally quite powerful.
I find PHP better small-to-medium-sized Web sites. It tends to be cleaner, but could also take awhile to write. It also has modules, via PEAR, but I've never used those.
Thanks!
if you're asking in regards to web apps, i've never initially thought of perl when choosing a language. although, i don't see why not - it's similar to python, which is what i use.
Perl isn't really designed for doing Web apps, but Web app stuff is available as libraries. I'd stick with PHP, since that's its purpose in life.
Perl is slick. :)
Quote from: iago on June 10, 2008, 02:10:47 PM
it does feel 100% hackish 100% of the time.
Fixed.
Quote from: Camel on June 12, 2008, 05:45:15 PM
Quote from: iago on June 10, 2008, 02:10:47 PM
it does feel 100% hackish 100% of the time.
Fixed.
Lol. Whenever I do a project in perl, I always find myself saying "Fucking perl... I hate it."
I've always thought that it was strange that, since it's among the most efficient of interpreted languages, it should have had time to mature in to a language that isn't cryptic.
Quote from: Camel on June 12, 2008, 11:33:23 PM
I've always thought that it was strange that, since it's among the most efficient of interpreted languages, it should have had time to mature in to a language that isn't cryptic.
haha, yea, if you use the features perl provides, it makes the code almost unreadable.
What an understatement! If you're not an experienced, you can't be decipher even the simplest perl commands.
That's not true at all. My Perl code doesn't look significantly different from my C or PHP code.
Either you're not making use of all the nifty Perl features, or you're just used to reading Perl. :P
Of course I'm not making use of the "nifty" features, they tend to make the code ugly/unreadable. I program it in the cleanest way I can.
Quote from: iago on June 13, 2008, 02:04:55 PM
Of course I'm not making use of the "nifty" features, they tend to make the code ugly/unreadable. I program it in the cleanest way I can.
Ugly and unreadable to the untrained eye! They can speed things up if everyone knows what they means. But, there's always the English module if you don't like the whacky unreadable variable names.
Even if everyone is familiar with the shortcuts, there's still a fair amount of extra tracing overhead involved when it's used excessively.
Quote from: iago on June 13, 2008, 02:04:55 PM
Of course I'm not making use of the "nifty" features, they tend to make the code ugly/unreadable. I program it in the cleanest way I can.
I do much the same, since it makes life easy when someone else wants to glance at my code and see what I did. English readable code for the win.
wtf...
sub wanted {
/^\.nfs.*\z/s &&
(($dev, $ino, $mode, $nlink, $uid, $gid) = lstat($_)) &&
int(-M _) > 7 &&
unlink($_)
||
($nlink || (($dev, $ino, $mode, $nlink, $uid, $gid) = lstat($_))) &&
$dev < 0 &&
($File::Find::prune = 1);
}
=X
/me head spins
Thats a pretty good example of why writing *readable* code is a good thing, no matter what language you are using...
hehe yeah, it's just the new lines that make that tough to read. it's essentially just a return statement.
It would be a lot less ugly as a try/catch block.