For J. Shirley
sub str2str {
my($str_in,$timezone,$dst) = @_;
my @lt = localtime(time);
$timezone = $dst if $lt[8];
if ($timezone =~ /^([+-])(\d{2})(\d{2})$/){
my $addval = “$1″.$2*3600+$3*60;
my $gmt = str2time($str_in);
$gmt += $addval;
my $str_out = time2str($gmt);
$str_out =~ s/GMT$/$timezone/;
return $str_out;
} else {
return undef;
}
}
Post Links
Flux Share |
Bookmark |
Permalink | Trackback |
Email to a Friend |
Leave a Comment
postxmlrpc.cgi shown on amsterdam.pm.org
Just in case you where thinking I had noting to write about anymore. The post “this is the title” was done with postxmlrpc.cgi on an amsterdam.pm.org meeting today to show how the script works.
Post Links
Flux Share |
Bookmark |
Permalink | Trackback |
Email to a Friend |
1 Comment
Don’t use Perl for Web Development?
This is a strange Post. Thanks Jan-Pieter for pointing us to it.
Update: See also this post by brian d foy.
Post Links
Flux Share |
Bookmark |
Permalink | Trackback |
Email to a Friend |
Leave a Comment
If you want a job learn Ruby or Perl
I saw this job trend. Depending on how you interpret it it seems you must learn Perl or Ruby to get a software development job.
Post Links
Flux Share |
Bookmark |
Permalink | Trackback |
Email to a Friend |
Leave a Comment
BBC creates Perl on Rails
Rails without Ruby. Read mere here.
Post Links
Flux Share |
Bookmark |
Permalink | Trackback |
Email to a Friend |
Leave a Comment
Perl 5.10.0-RC1 !
If you can’t wait for CPAN to sync:
ftp://pause.perl.org/pub/PAUSE/authors/id/R/RG/RGARCIA/perl-5.10.0-RC1.tar.gz
Post Links
Flux Share |
Bookmark |
Permalink | Trackback |
Email to a Friend |
Leave a Comment
XML-RPC Post test via Perl
This is a test uploaded by my new Perl script via XML-RPC. It includes Tags and Categories.
Post Links
Flux Share |
Bookmark |
Permalink | Trackback |
Email to a Friend |
Leave a Comment
Birthday calendar for rats
Today you can start creating your own Rats birthday calendar here. I expect to get a lot of pastry from now on to celebrate Dylan, Pancho, Lefty, Chester and Casey’s birthday ![]()
Post Links
Flux Share |
Bookmark |
Permalink | Trackback |
Email to a Friend |
1 Comment
Hack your HP Printer in Perl
Yaakov hacked up a script that lets you change the PRINTER READY message. Link
Post Links
Flux Share |
Bookmark |
Permalink | Trackback |
Email to a Friend |
Leave a Comment
Perl HTTP_AUTHORIZATION test

Theo wrote a HTTP_AUTHORIZATION test. If you have mod_rewrite enabled on your Apache 2 server put the following files in some folder. If you go to index.cgi from your browser it will show the default login box. Just enter some username / password and they will be shown on the page. Very cool Theo. Thanks.
This will help me create the first XSall tests without using mod_perl. If someone likes to create a Digest example please do? I like to test it and perhaps blog about it.
.htaccess
RewriteEngine on
RewriteRule \.cgi$ - [E=HTTP_AUTHORIZATION:%{HTTP:AUTHORIZATION},L]
index.cgi
#!/usr/bin/perl
use strict;
use warnings;
use CGI ‘:cgi’;
use MIME::Base64;
binmode STDOUT;
my ($user, $password);
my $auth = $ENV{HTTP_AUTHORIZATION};
if(defined$auth and $auth =~ /^Basic\s+/) {
$_ = decode_base64($’);
($user, $password) = split(‘:’); # What is the username or password contains a “:”?!
}
if(!defined($user) or $user eq ‘‘) {
print “Status: 401\r\n”;
print “WWW-Authenticate: Basic “;
print “realm=\”testers\@taletn.com\”\r\n“;
print “Content-Type: text/plain\r\n”;
print “\r\n”;
print “401\n”;
exit 0;
}
print “Content-Type: text/plain\r\n”;
print “\r\n”;
print “Authorization: $auth\n”;
print “User: $user\n”;
print “Password: $password\n”;
exit 0;
Post Links
Flux Share |
Bookmark |
Permalink | Trackback |
Email to a Friend |
1 Comment