Skip to content

Instantly share code, notes, and snippets.

@moritz
Created June 14, 2012 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritz/2931318 to your computer and use it in GitHub Desktop.
Save moritz/2931318 to your computer and use it in GitHub Desktop.
URL mangling for YAPC::NA
use strict;
use warnings;
use 5.010;
my $url = 'http://ics.webcast.uwex.edu/mediasite/Viewer/?peid=8d476c840c5e4c6a84ec2ccf33a38ee41d';
if ($url =~ /peid=(\w+)/) {
my $peid = substr($1, 0, -2);
my $new = join '-', unpack '(A8)(A4)(A4)(A4)(A*)', $peid;
say "http://video.ics.uwex.edu/$new";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment