Perl goodies #1

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Perl goodies #1

Post by ^rooker »

[small function for following a frameset]

------------------------------------------------------------------
sub followFrameSet {
my ($content, $frameName) = @_;

print "Checking for frameset... ";
if ($content =~ /<FRAME.*name=$frameName.*src="(.*)"/) {
print "found. - ";
print "following frame-src: $1\n";
return $1;
}
print "negative.";
return;
}
------------------------------------------------------------------
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Perl and Text-to-speech

Post by ^rooker »

[Speaking text using 'festival']

------------------------------------------------
sub say_something {
my $text = shift;
open(FESTIVAL, '| festival --tts --pipe');
print FESTIVAL $text;
}
------------------------------------------------
Post Reply