Many applications require there to be a password.
SELECT host, user FROM mysql.user;
SET PASSWORD FOR 'bob'@'%.loc.gov' = PASSWORD('newpass');
A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.
Jump to
How to convert a tab separated file into a Perl hashref
open(LIST,'<',$datafile) || die "Failed to open ".$datafile;
my @header = split("\t", <list>);
chomp(@header);
my @nodes = ();
while (my $line = <LIST>) {
chomp($line);
my $i=0; my %node = map { $header[$i++] => ($_?$_:'[empty field]') } split("\t", $line);
push @nodes, \%node;
}
close(LIST);
print Dumper(\@nodes);
Simple log4perl config
log4perl.rootLogger=DEBUG, STDERR
log4perl.appender.STDERR=Log::Log4perl::Appender::Screen
log4perl.appender.STDERR.layout=PatternLayout
log4perl.appender.STDERR.layout.ConversionPattern=[%d] [%p %c] - %m%n
log4perl.appender.STDERR=Log::Log4perl::Appender::Screen
log4perl.appender.STDERR.layout=PatternLayout
log4perl.appender.STDERR.layout.ConversionPattern=[%d] [%p %c] - %m%n
Subscribe to:
Posts (Atom)