[mythtv-users] Immir tv_grab_au 1.64

William Pettersson enigma at strudel-hound.com
Tue Jun 20 11:05:49 UTC 2006


Michael Smith wrote:
> Hey guys,
> 
> Life is getting complicated now. Obfuscation functions now change their 
> name randomly. Keep an eye on script... Not sure why I don't get the 
> uninitialsed value errors (regarding s///) -- see below.
> 
> Michael.
> 
> p.s. I get no errors from this mini-script --- if you do, check your 
> version of perl is recent enough?
> 
> 
> use strict;
> use warnings;
> use Data::Dumper;
> 
> $a = { 'category' => [ [ 'Animation', 'en' ] ], 'channel' =>
>    'act-abc2', 'desc' => [ [ 'Pickle has trouble grasping the idea of
>    Sophie having a pretend friend.', 'en' ] ], 'guidedate' =>
>    '20060621', 'row' => 68, 'start' => '2006062111:38:00', 'stop' => '
>    2006062111:50:00', 'sub-title' => [ [ "Pretend \x00 \xff Friend ", 
> 'en' ] ], 'title' => [ [ 'ToddWorld ', 'en' ] ] };
> 
> cleanup($a);
> print Data::Dumper->Dump([$a],qw(a));
> sub cleanup {
>    my $x = shift;
>    if    (ref $x eq "REF")   { cleanup($_) }
>    elsif (ref $x eq "HASH")  { cleanup(\$_) for values %$x }
>    elsif (ref $x eq "ARRAY") { cleanup(\$_) for @$x }
>    else {
>      $$x =~ s/ / /g;
>      $$x =~ s/&/&/g;
>      $$x =~ s/&#(\d+);/chr($1)/eg;
>      $$x =~ s/(^\s+|\s+$)//g;
>      $$x =~ s/[^\x20-\x7f]/ /g;
>    }
> }
> 
> 
> If this fails, check your version... mine is:
> 
> [michael at htpc ~]$ perl -v
> 
> This is perl, v5.8.6 built for i386-linux-thread-multi
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 
> 
> 
I've got per 5.8.8.  Your mini script runs fine, not sure why the actual
script gave errors before.  Either way, my internet is incredibly borked
at the moment, ADSL sync issues.  So I can't test it at the moment, I'm
just sending this email during the 5-odd seconds that I do have a
connection.


More information about the mythtv-users mailing list