Merlyn Kline

  • About: Perl dev
  • Commented on Could anybody explain this code?
    Looks like redundant nonsense to me. The perl is rather clumsy but it splits the input, which is always "uniprot_sprot_archaea.dat", on underscore characters and extracts the third part, so that's always "archaea.dat", then it finds a word before the ".dat",...
  • Commented on Why I try to avoid Perl's punctuation variables
    I'm with Ovid. I love that perl will let me do very concise things and has all these features, but they should be used appropriately. Invoking perl with -e on the command line to do some one-off task is often...
  • Commented on A Date with CPAN, Part 3: Paving While Driving
    I was fiddling with date parsing (i.e. conversion) ideas recently and left the end result here: Might or might not contain some useful ideas....
Subscribe to feed Recent Actions from Merlyn Kline

  • Steve Nolte commented on Why I try to avoid Perl's punctuation variables

    I applaud this article and others like it. At $work we are constantly fighting bugs in code that is "too clever" and not explicit. Also fascinating to see what may seem obvious to some (e.g. the Babycart operator) but quite confusing to newbies.

  • Saif commented on Could anybody explain this code?

    Mixture of bash and perl, aimed at generating another perl script, I think.

    1) Bash for every files ending in dat.gz puts that file nam in $i does the following.
    2) it unrchives that file
    3) the next bit extracts the characters in 'uniprot_sprot_archaea.dat' passing it into a perl script, splits on @_@, and gets the third match found and puts it in $a. Then everything before.dat is captures and put into $b. This will always be "archaea" in this context.
    4) it then creates a line containing ' "perl \$i "…

  • Saif commented on Could anybody explain this code?

    Sorry, I think the new perl exectuable is actually printed to the screen?, and the perl gnerated copies the results of running sreen_complete(too long snip).pl into uniprot_archea.fasta. Maybe.

  • Aristotle commented on Could anybody explain this code?

    As others have said, your script looks like an unfinished attempt to solve a problem, and doesn’t actually do much. It just uncompresses the *dat.gz files in the current directory. For each of the files it also prints a line to the screen, but it’s always the same line, so it obviously serves no purpose.

    Btw, is (as the name says) not a forum. You will have better luck asking somewhere like

  • Aristotle commented on Could anybody explain this code?


    The bit at the end is not meaningless. It works with the -s switch that’s passed to the perl call. It makes the value of the -i switch into the value of the variable $i in the code. And because the value of the -i switch is the shell variable $i, the Perl variable $i gets the same value as the shell variable $i: the filename being processed.

    (Surprise! Did you know Perl had this feature? 😊 You …

Subscribe to feed Responses to Comments from Merlyn Kline

About is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.