Open links in new tab
  1. How do I efficiently parse a CSV file in Perl? - Stack Overflow

    Jun 18, 2010 · I'm working on a project that involves parsing a large csv formatted file in Perl and am looking to make things more efficient. My approach has been to split() the file by lines first, …

  2. How do I tell what type of value is in a Perl variable?

    Nov 13, 2009 · A scalar always holds a single element. Whatever is in a scalar variable is always a scalar. A reference is a scalar value. If you want to know if it is a reference, you can use ref. …

  3. How do I get a file's last modified time in Perl? - Stack Overflow

    Feb 4, 2009 · It is cryptic but very perlish and fits nicely in situations where you don't have a file handle already (-X can operate on a file path or filehandle). p.s. I used to have trouble finding …

  4. What is the fastest way to delete a value from an array in Perl?

    It only deletes the value, making it undef. Besides, from the doc linked by ringø : "WARNING: Calling delete on array values is strongly discouraged. The notion of deleting or checking the …

  5. In Perl, how can I concisely check if a $variable is defined and ...

    Sep 26, 2009 · 99 I currently use the following Perl to check if a variable is defined and contains text. I have to check defined first to avoid an 'uninitialized value' warning:

  6. How can my Perl script find its module in the same directory?

    I recently wrote a new Perl script to kill processes based on either process name / user name and extended it using Classes so that I could reuse the process code in other programs. My …

  7. How to search and replace string in a file in Perl

    Sep 6, 2012 · The -i flag here means "in place editing". Perl does this under the hood by creating a temp-file with the results and later renaming that file to the name of the original.

  8. How do I include functions from another file in my Perl script?

    Mar 6, 2014 · The comment of #use "trims.pl" can be pasted in your perl script, uncommented (remove the #) and perl will look in the same folder your script is in to find trims.pl and this puts …

  9. Best way to iterate through a Perl array - Stack Overflow

    Mar 30, 2017 · Which is the best implementation(in terms of speed and memory usage) for iterating through a Perl array? Is there any better way? (@Array need not be retained). …

  10. How to parse a string into a DateTime object in Perl?

    Oct 29, 2011 · I know about the DateTime Perl module, and many of the DateTime::Format:: modules to parse specific kinds of date/time formats. However given some examples of …