[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MCF files, BBEdit extensions




On Thu, 12 Dec 1996, Chris Nandor wrote:

> One question: is there a way to direct the STDOUT of a Perl Filter script
> to a new window without selecting STDERR?  I suppose I could just preface
> each script with "select STDERR" ...

I'm not sure if this is what you want to do, but I think one of the
distributions of MacPerl has the following in it:


#!/usr/bin/perl

print "Hi testers, I'm the first Perl program running under the\n";
print "new standalone Perl.\n";
print "Do you like me ? ";

$_ = <>;

unless (/yes/i || /yeah/i || /yup/i || /sure/i) {
        print "I'm sorry to hear that!\n";
        die;
}

open (OTHER, ">Dev:Console:I Can Do Multiple Windows Now!") || die;

print OTHER "This one is read only\n";


open (THIRD, "+>Dev:Console:As many as you like!") || die;

print THIRD "This one is read/write\n";

print THIRD "Now how do you like that?? ";

$_ = <THIRD>;

chop;

print "You said \"$_\"? I thought you would.\n";

print "Bye\n";

&MacPerl'Quit(1);


Now if only I could figure out what to do with these "pod" thingies,
I'd be on my way ...  what are these things anyways ... something outta
the "Body Snatchers" perhaps??



Istvan.