'perl' Tag

  • Producing MySQL dates from Perl

    April 24, 2011

    Ever written the occasional Perl script and wanted to insert the current date and time into a MySQL database? Here is the function to do it. This works for a column of type ‘datetime’. 1 2 3 4 5 6 # function to return the current time in mysql format sub mysql_now() { my($sec,$min,$hour,$mday,$mon,$year,$wday, $yday,$isdst)=localtime(time); [...]

  • Grep is broken – use perl instead

    July 2, 2010

    In the course of running various grep(1) combination to find various defects in source files I ran into inherent grep(1) difficulties. It seems that the regular expression syntax in grep(1) is very limited and so it’s better to use perl to solve these issues as it’s regular expression support is fantastic. A small script can [...]

 
Powered by Wordpress and MySQL. Theme by Mark Veltzer derived from Shlomi Noachs openark theme