News for hackers. Stuff that matters.
Re:The Fall Of Perl, The Web's Most Promising Language by nathancahill on Sunday February 23, 2014 @10:41PM (#7288973)
This could have been titled "The Rise Of Python".

Both languages have their uses. I write almost all of my code in Python these days, but fall back to Perl for complicated bash scripting. Shell scripts in Python feel clumsy, while Perl is very well suited for that environment.

Re:The Fall Of Perl, The Web's Most Promising Language by crdoconnor on Sunday February 23, 2014 @11:46PM (#7289135)
>Shell scripts in Python feel clumsy

Not once you've seen this: http://amoffat.github.io/sh/

Re:The Fall Of Perl, The Web's Most Promising Language by nathancahill on Sunday February 23, 2014 @11:47PM (#7289142)
Oh wow, that's pretty sweet. I'll have to play around with that.
Re:The Fall Of Perl, The Web's Most Promising Language by sliverstorm on Sunday February 23, 2014 @11:13PM (#7289053)
As a Perl programmer whose colleagues occasionally encourage me to switch to Python, can you tell me a little more about what you see to be the uses of each, and why Python feels clumsy for scripting?
Re:The Fall Of Perl, The Web's Most Promising Language by nathancahill on Sunday February 23, 2014 @11:37PM (#7289115)
My bash scripts usually deal with files and text processing. Bash and Perl are great for that, especially Perl when I need a little more structure. Perl is more performant than Python for these tasks.

Python is great for other types of scripts though, I usually switch to Python when I need to interact with web services or databases (there are great libraries that make this really easy, Requests and SQLAlchemy).

As far as Python feeling clumsy for shell scripts, things like importing basic os functions:

    import os, sys, shutil
and:

    if __name__ == "__main__":
don't make it feel like the best language for the job.
Re:The Fall Of Perl, The Web's Most Promising Language by Tossrock on Monday February 24, 2014 @01:16AM (#7289346)
If you're not worried about using the script as a module later, you don't technically need the __name__=="__main__" guard.
Re:The Fall Of Perl, The Web's Most Promising Language by pyre on Monday February 24, 2014 @02:03AM (#7289485)
While I agree that Python seems more clumsy for shell-type scripting, Perl has most of the 'basic' OS functions scattered all over the place, not in a couple of comprehensive libraries. E.g.:

  File::Basename
  Cwd  <= where abs_path resides, for some reason
  File::Path <= rmtree, etc
  File::Spec
  File::Spec::Functions
  ... etc ...