home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User 10
/
AU_CD10.iso
/
Updates
/
Perl
/
RPC
/
!Perl
/
scripts
/
TextAreaRE
< prev
next >
Wrap
Text File
|
1998-07-14
|
515b
|
21 lines
use RISCOS;
use RISCOS::DrawFile;
use RISCOS::File 'globlist';
# A program to change the contexts of text areas using a regular expression.
# This RE makes all \AD\L24 into \AL\L24/\P24
# Now do that in !Draw with 12 files...
sub change {
return unless my $met = $_[0]->can('TextArea');
$_ = &$met($_[0]);
$_ =~ s/\\AD\\L24/\\AL\\L24\/\\P24/;
&$met($_[0], $_);
}
foreach $file (globlist (@ARGV)) {
$draw = new RISCOS::DrawFile ($file,'+');
$draw->Do(\&change);
$draw->Write($file);
}