submitted by /u/briandfoy [link] [comments] |
- YouTube
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.www.youtube.com
Hi all! I have a bug in my script I can't locate and I'm sure it must be some silly thing.
I am using a SQLite database with a contacts table that includes a field for the date in which the contact was added or edited. This is a DATE type field defined as "editado" date NOT NULL
.
I search for a group of contacts by doing this (nomap
is a string field with name and lastname):
sub cntSearch( $srch ) { my @result = (); my $tosrch = $srch; $tosrch =~ s/([\\%_'"\[\]])/\\$1/g; # LIKE no admite $dbh->quote() $sth = doSQL( "SELECT * FROM contactos WHERE nomap LIKE '%$tosrch%' ORDER BY nomap" ); while ( $hr = $sth -> fetchrow_hashref() ) { utf8::decode( $hr->{nomap} ); push @result, $hr; } return @result; }
At this point, if I read
$hr->{editado}
, I get the string I want (a date in the YYYY-MM-DD format). But when I do this:my @cntlist = cntSearch( $srch ); for ( @cntlist ) { my ( $codigo, $nomap, $ref, $editado ) = ( $_->{codigo}, $_->{nomap}, $_->{referencia}, $_-->{editado} ); }
the variable
editado
gets the value 1.The actual code is more complex but this is the gist of it and I think the other stuff is not related.
Any advice on this would be appreciated!
submitted by /u/elbitjusticiero
[link] [comments]
Perl was (and still) is used for system administration to this day. If you have professional system administration experience what have you seen Perl used for in sysadmin practices the most?
When would you recommend it? When would you not recommend it and what would be the alternativein which case?
Do you still see coworkers and yourself using Perl for such tasks. I ask because I'm confused as to how Perl stands up as a system admin tool compared to other options in modern times.
submitted by /u/fosres
[link] [comments]
submitted by /u/oalders [link] [comments] |
GitHub - fglock/PerlOnJava: An implementation of the Perl programming language designed to run on the Java platform
An implementation of the Perl programming language designed to run on the Java platform - fglock/PerlOnJavaGitHub