HDTenEightyP/NetNews huggingface dataset:
From: mjeffery@reed.edu (Mark Jefferys)
Newsgroups: comp.lang.perl
Subject: Re: In 5.0, are we gonna get...
Date: 15 Dec 92 05:31:56 GMT
Article-I.D.: reed.1992Dec15.053156.1836
Organization: Reed College, Portland, OR

In article <1992Dec14.192007.7534@wdl.loral.com> mab@wdl39.wdl.loral.com (Mark A Biggar) writes:
% In article <1992Dec14.043835.23009@reed.edu> mjeffery@reed.edu (Mark Jefferys) writes:

% >	map(/(\d+)/, "asdf 23fjk4", "qwerty", "123 ")
   	           ^ forgot the `g'

% >   would return ("23", "4", "123").

% Easily constructed using grep:
% 
%         grep((/(\d+)/,$_=$1), "asdf 23jfk4", "qwerty", "123 ")

This seems to fail badly on my perl -- besides, it destroys the list,
which I don't want it to do.

% >2) a way of only matching the real beginning/end of a *string* in a
% >   regexp?  Currently, '^' and '$' match the beginning and ending of
% >   a line (with simplifying assumptions when $* == 0).  A string match
% >   would ignore newlines and $*.
% >
% >   A new option on pattern matches might do it:  `/^\d+$/s' might match
% >   "23", but not "23\n" or "x\n45".  The option should treat `.' as
% >   matching "\n", as well as every other character -- so the option
% >   means that "\n" should not be treated specially. 
% 
% I believe that ^ at the beginning of a pattern will only match the beginning
% of a string and $ at the end only the end, $* has effect only on embedded
% ^ and $ in the middle of a pattern.

No.  ^ matches the beginning of a string or right after a newline, and
$ matches the end of string or right before a newline.  When $* is 0,
perl assumes that a newline only occurs at the last character of the
string.


Mark
-- 
Mark Jefferys		Internet: mjeffery@reed.edu
From: cameron@spectrum.cs.unsw.oz.au (Cameron Simpson)
Subject: Re: timing problem with $SIG{'CHLD'}
Reply-To: cameron@spectrum.cs.unsw.oz.au (Cameron Simpson)
Organization: CS&E Computing Facility, Uni Of NSW, Oz
Date: Tue, 15 Dec 1992 06:25:47 GMT

nobled@rebecca.its.rpi.edu (David Noble) writes:
|     until ($addr = accept(NS,S))
| 	{ die $! unless $! eq 'Interrupted system call'; }
| 
| Of course, this breaks if the text of the error message varies for
| different platforms. In that case, you would have to check for any
| variants on the interrupted system call message. Anybody know offhand
| whether the text of $! is defined by perl or the operating system?

ggr@nareen.acci.COM.AU (Greg Rose) writes:
| My understanding is that the text of the error message comes from
| somthing that (eg. IBM) vendors often change, but the *NUMBER*
| associated with the error is defined by POSIX. So I always use
| 
| sub EINTR { 4; }
| 
| until ($addr = accept(NS,S)) {
| 	die $! unless $! == &EINTR;
| }

Better still,

	require 'errno.ph';

	until ($addr = accept(NS,S)) {
		die $! unless $! == &EINTR;
	}

since the name should be even stabler.
	- Cameron Simpson
	  cameron@cs.unsw.oz.au, DoD 0743
--
"The engine purrs beneath me with a purpose,
 ready for the pleasure of my hand upon the throttle." - Peter Smith
Newsgroups: comp.lang.perl
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: Is this a perl bug?
Organization: Motorola Codex, Canton, Massachusetts
Date: Mon, 21 Dec 1992 03:33:12 GMT

lwall@netlabs.com (Larry Wall) writes:

>: And open(FH,"|-",'cat',$foo) could be like open(FH,"|cat $foo"), except that
>: it would be done directly via exec, not via "sh -c".

>I don't see the point, when

>	open(FH, "|-") || exec 'cat', $foo;

>does the same thing.  In fact, so does

>	open(FH, "|cat $foo");

>as long as $foo contains no shell metacharacters.

Yes, you're right, of course.
It just seems so natural...

Michael.
Newsgroups: comp.lang.perl
From: chip@tct.com (Chip Salzenberg)
Subject: Re: system() vs exec()
Date: Thu, 17 Dec 1992 17:01:40 GMT
Organization: TC Telemanagement, Clearwater, FL

According to tchrist@convex.COM (Tom Christiansen):
>    sub system { fork ? wait : exec @_ }

What if fork fails?  Try instead:

    sub system {
        local($pid) = fork;
        return undef unless defined($pid);
        $pid ? wait : exec @_;
    }

Note that, for non-BSD systems, you should check for EINTR; changes to
that effect are left as an exercise for the reader. :-)
-- 
Chip Salzenberg at Teltronics/TCT  <chip@tct.com>, <73717.366@compuserve.com>
  "you make me want to break the laws of time and space / you make me
   want to eat pork / you make me want to staple bagles to my face /
   and remove them with a pitchfork" -- Weird Al Yankovic, "You Make Me"
Newsgroups: comp.lang.perl
From: mmuegel@next3.corp.mot.com (Michael S. Muegel)
Subject: Re: Perl IV & V incompatibilities?
Organization: Corporate Information Office, Schaumburg, Illinois, Motorola, Inc.
Date: Sun, 20 Dec 1992 05:53:32 GMT

Previously, lezz@merlin.dev.cdx.mot.com (Lezz Giles) wrote:
>
> I'm getting a little bit scared about Perl V - I have lots of Perl IV code
> and I'm scared that it'll all have to be rewritten when I move to Perl V.
>

I am hoping that innovation and change does not come at the expense of
backwards compatibility myself. It is very easy to ensure that your
Perl4.x  programs keep working when Perl5 comes out. You can just
explicitly call out a version of Perl ala:

   #!/usr/bin/perl4.035

Then just keep this version of Perl on your system along with Perl5.

-Mike

-- 
+----------------------------------------------------------------------------+
| Michael S. Muegel                  | Internet:    mmuegel@mot.com          |
| UNIX Applications Startup Group    | Moto X.400:  X10090                   |
| Corporate Information Office       | Voice:       (708) 576-0507           |
| Motorola, Inc.                     | ... these are my opinions, honest ... |
+----------------------------------------------------------------------------+
From: kono@csl.sony.co.jp (Shinji Kono)
Newsgroups: comp.lang.perl
Subject: Re: Perl 5 and Latin-1
Date: 14 Dec 92 13:16:21 GMT
Reply-To: kono@csl.sony.co.jp
Organization: Sony Computer Science Laboratory, Inc.

Support for 8bit char and multi-byte code sounds very good. I heard
there is a two byte char code version of perl for Japanese.

In article <1992Dec14.101320.27904@enea.se> , 
	sommar@enea.se (Erland Sommarskog) writes 
>Using Latin-1 would also give a vast new range
>of special characters which could used as operators and other
>funny things. 

Hm, how about JIS X 0208 for perl? You have more than 7000 operaors as
kanji characters!  If you think it is ridiculous, Latin-1 operators are
also reidiculous to us.
---
Shinji Kono @           kono@csl.sony.co.jp
Sony Computer Science Laboratory, Inc,Japan
From: mark@coombs.anu.edu.au (Mark)
Newsgroups: comp.lang.perl
Subject: Re: Wanted: Good starter books/references
Date: 14 Dec 92 14:32:34 GMT
Organization: Australian National University
NNTP-Posting-Host: 150.203.76.2
Organisation: Wassat?!

mrgreen@mullian.ee.mu.OZ.AU (matthew green) writes:

>holland@matt.ksu.ksu.edu (Rich Holland) writes:

>>Anyone have any suggestions about which books/articles/papers I should be
>>reading as a beginning perl programmer?  E-mail please, and I'll summarize
>>to comp.lang.perl in about a week or so (if I get anything)..

>I think the only book you need is the Bible....   some people call it
>the camel book...  the real stickers call it "Programming Perl" ..

Another good way to get up to speed is to check out what others have done.
ftp to coombs.anu.edu.au in /pub/perl/scripts and have a browse...


README file from /pub/perl on coombs.anu.edu.au[150.203.76.2]

-=-=-=-=-=-=-=-=-=-=-=-
Australian Perl Archive
-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-
Please Note  Please restrict ftp times to outside normal business hours for
-=-=-=-=-=-  this site:
                          8:30am -  6:00pm AEDT -- Aussie
                          1:30pm - 11:00am PDT  \
                          3:30pm -  1:00am CDT   >-- USA
                          4:30pm -  2:00am EDT  /
   *** See below *** <-- 10:30pm -  8:00am GMT  -- Europe

This archive is maintained by mark@coombs.anu.edu.au

Scripts are currently obtained from:

archive.cis.ohio-state.edu   /pub/perl       Last: 20 Oct 92
convex.com                   /pub/perl       Last: 20 Nov 92
sra.co.jp                    /pub/lang/perl  Last: 15 Oct 92
comp.lang.perl.                              Last: 20 Nov 92

Note: European users please use the mirror site on src.doc.ic.ac.uk[149.169.2.1]
      in /programming-languages/perl/coombs-scripts. The link speed would
      be a lot better for all. Contact L.McLoughlin@doc.ic.ac.uk for more
      information. It is updated daily.

See the file INDEX for a description of each script.
Please deposit any scripts in the 'incoming' directory
Pointers to more scripts always very welcome.

Share and enjoy.

Mark.
mark@coombs.anu.edu.au         Voice: +61-3-660-3130    Fax: +61-3-639-1685
mark@gnu.ai.mit.edu            Technical Services, Faculty of Social Sciences 
markm@rmit.edu.au              Communications Dept. RMIT, Melbourne, Australia.
Newsgroups: comp.lang.perl
From: sommar@enea.se (Erland Sommarskog)
Subject: Perl 5 and Latin-1
Organization: Enea Data AB
Date: Mon, 14 Dec 1992 10:13:20 GMT

Perl 4 is decently 8-bit clean, not to say completely 8-bit clean.
However, its opinion on the characters > 128 seems to be that they
are special characters, so none of them won't match or eligble for
subroutines names. (They can be used in variable names though, like
almost any other character.)

I suggest that as a first step Perl 5 supports also Latin-1 and
includes the codes from 192 to 255, 215 and 247 excepted, in the 
alphanumeric set. Using Latin-1 would also give a vast new range
of special characters which could used as operators and other
funny things. Of course, it would probably be very mean to have
some new operator only using an eight-bit character, but it could
an alternative.

-- 
Erland Sommarskog - ENEA Data, Stockholm - sommar@enea.se
Newsgroups: comp.lang.perl
From: sommar@enea.se (Erland Sommarskog)
Subject: Re: Another RE query
Organization: Enea Data AB
Date: Sat, 19 Dec 1992 21:54:41 GMT

A while ago I wrote:
>Basically what I'm writing is a simple text formatter in which
>user-defined strings are converted to escape-sequences for enscript.
>Those strings occurs in pairs to mark start and end of the text
>to be in deviating font. Anyway, innocently I tried something
>like:
>
>    s!${start}((.|\n)*${stop}!${esc}F${ch1}$1${esc}F${ch2}!g
>
>But of course I got bitten if the pair twice in the same paragraph.
>(I read text paragraph by paragraph, a deliberate restriction.) Would
>$stop be guaranteed to be one character long, it would be trivial:
>
>    s!${start}([^${stop}]*)${stop}!${esc}F${ch1}$1${esc}F${ch2}!g
>
>But $start and $stop can be any length, although would only expect
>one or two characters in practice. But two characters is enough to
>kill the idea.

Randall Schwartz was quick to tell me that REs won't work, that's
computer science, not Perl. But as I told him, I am writing this
is Perl, not computer science.

Anyway, I've come to conclusion that I can actually get what I
want with regular expressions, if I introduce the restriction
that if $start and $stop may only be equal, if they are one character
long. Then I can look at $start and $stop and if they are equal,
I can use the second substitution above - the one with [^${stop}].
If they are not equal, I can simply subsitute them separately,
and ignore what is in between.

I'm not certain that this restriction is feasible. I might want
to use equal $start and $stop like //, but surely not $%. (That
would rather be $% and %$.) But if I find that the index and
substr code that I've written - but not yet had the time to test -
is too slow, this might be a path to go.
-- 
Erland Sommarskog - ENEA Data, Stockholm - sommar@enea.se
Newsgroups: comp.lang.perl
From: lwall@netlabs.com (Larry Wall)
Subject: Re: How to handle switches and args
Organization: NetLabs, Inc.
Date: Thu, 17 Dec 1992 19:52:27 GMT

In article <1992Dec16.195350.8532@drd.com> mark@drd.com (Resident.Alien) writes:
: What's the current consensus and generally favored
: method to handle switches and args to a script?
: 
: 
: I'm improving a currently existing script which is wholly interactive
: to take args so I can feed it things from my mail reader.
: 
: something like:
: 
: | dobug.pl -app foo -cat bar -topic 'This is the topic of this bug report'
: 
: Is there some generally approved package to handle such an animal?

Have a look at newgetopt.pl in the Perl library.

Larry
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Statistic routines ?
Originator: tchrist@pixel.convex.com
Date: Tue, 15 Dec 1992 15:50:17 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
Keywords: statistic
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of lendl@cosy.sbg.ac.at (Otmar Lendl):
:I have to do some statistical analysis of data I gather with
:perl scripts, so it would be convenient to use perl for that
:purpose, too.
:
:Before I start to write my own set of functions (Mean, standard-deviation,
:histograms, ...) I better ask if there are already such beasts.
:I checked the script-archives listed in the FAQs (convex, ohio-state),
:but could not find anything suitable.

Here's something I hacked out yesterday.  The format is 

title<tab>a b c d e

where the letters are the number of scores of value 1..5;

--tom


#!/usr/bin/perl
$[ = 1;
while (<>) {
    if (/^\s*$/) {
	print;
	next;
    } 
    $v = $mean = $sum = $n = $sdev = 0;

    ($title, $figures) = /^([^\t]+)\t+(.*)/;
    split(' ',$figures);

    for ($i = 1; $i <= 5; $i++) {
	$n += $_[$i];
	$sum += $i * $_[$i];
    } 

    $mean = $sum / $n;

    for ($i = 1; $i <= 5; $i++) {
	for ($j = 0; $j < $_[$i]; $j++) {
	    $v += ($mean - $i) ** 2;
	} 
    }
    $v /= $n;
    $sdev = sqrt($v);

    write;
    
} 

format STDOUT_TOP = 
Course Title                   N     Mean   Std Dev
==========================    ===    =====  =======
.

format STDOUT = 
@<<<<<<<<<<<<<<<<<<<<<<<<<    @##    @#.##  @#.##
$title,			     $n,     $mean, $sdev
.

-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist
    Even if you aren't in doubt, consider the mental welfare of the person who
    has to maintain the code after you, and who will probably put parens in
    the wrong place.  --Larry Wall in the perl man page 
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: array of file descriptors
Originator: tchrist@pixel.convex.com
Date: Fri, 18 Dec 1992 11:37:28 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of fuat@news.ans.net (Fuat C. Baran):
:Is there a way to store file descriptors (from an open()) in an array?
:I would like to open a set of files, store the open file descriptors
:in an associative array keyed by filename and be able to multiplex
:output to one of the files in a loop where for each line of output I'm
:given a filename.  I'd like to check if $filehandles{$filename} is
:defined and if not first open the file.

Here's one thing that I use.  Just call
    
    &'cachein($filename);

and now you can say

    while (<$filename>) {
	
    } 


It also gives nice error message for warn and die this way.
Here are the routines; beware that Suns lies about what NOFILE
really is.  Thanks for helping us write portable code, Sun.

--tom

    sub init_filecache {
	package filecache;

	if (defined &'NOFILE) {
	    $maxopen = &'NOFILE - 12;
	    return;
	} 

	$seq = 0;
	$numopen = 0;

	if (open(PARAM,'/usr/include/sys/param.h')) {
	    local($.);
	    while (<PARAM>) {
		$maxopen = $1 - 12 if /^\s*#\s*define\s+NOFILE\s+(\d+)/;
		$'NOFILE = $1;
	    }
	    close PARAM;
	}
	$maxopen = 6 unless $maxopen;
    } 


    sub filecache'open {
    # open in their package
	open($_[0], $_[1]);
    } 
    # but they only get to see this one

    sub main'cachein {
	package filecache;
	($file) = @_;
	($package) = caller;
	if (!$isopen{$file}) {
	    if (++$numopen > $maxopen) {
		sub byseq {$isopen{$a} <=> $isopen{$b};}
		local(@lru) = sort byseq keys(%isopen);
		splice(@lru, $maxopen / 3);
		$numopen -= @lru;
		for (@lru) { close $_; delete $isopen{$_}; }
	    }
	    &open($file, "< " . $file) || return undef;
	} elsif ($'U{'debug'}) {
	    # 
	} 
	seek($file,0,0);
	$isopen{$file} = ++$seq;
    } 

    sub main'uncache {
	package filecache;
	local($file);
	for $file (@_) {
	    if ($isopen{$file}) {
		close $file;
		delete $isopen{$file};
		$numopen--;
	    } 
	} 
    } 

    sub main'clear_filecache { # (DIRECTORY)
    #%%#
    #%%# Close anything cached open in this directory.
    #%%#
	package filecache;
	local($dir) = @_;
	for $file (keys %isopen) {
	    if (index($file,$dir) == 0 && 
		substr($file, length($dir), 1) eq '/')
	    {
		close $file;
		delete $isopen{$file};
		$numopen--;
	    } 
	} 
    } 

__END__
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist

    echo "Your stdio isn't very std."
            --Larry Wall in Configure from the perl distribution
Newsgroups: comp.lang.perl
From: lwall@netlabs.com (Larry Wall)
Subject: Re: programming challenge
Organization: NetLabs, Inc.
Date: Wed, 16 Dec 1992 19:54:15 GMT

In article <1992Dec15.160559.20946@black.ox.ac.uk> mbeattie@black.ox.ac.uk (Malcolm Beattie) writes:
: My first attempt
: was to complement the null SEARCHLIST and do tr///cs in order
: to save using \0-\377 but the complement is done before the
: searchlist gets copied in place of the null replacelist.
: 
: A little further playing turned up the short incantation
: tr/*//c
: which turns all the characters in $_ into asterisks. Probably
: useless but rather neat, I thought.

Certainly useless when you get past version 4.019, since it was later
changed to work the way you expected...

Larry
From: meb4593@galileo.rtn.ca.boeing.com (Michael Bain)
Newsgroups: comp.lang.perl
Subject: Re: C comment parser?
Date: 16 Dec 92 22:50:10 GMT
Organization: Boeing Commercial Airplane Group, Seattle

mcook@fendahl.dev.cdx.mot.com (Michael Cook) writes:
>
>Remember that RE's are maximally matched (in Perl, and most Unix tools).  If
>$_ has two or more comments in it, that s/// is going to delete them all in
>one swoop, and it'll also delete everything between the comments.

Hmm, I didn't know that (says the self-taught UNIX person that only read
man pages, and the camel book).

>But RE's are really the way to go.  The if comment is very big, Perl will dump
>core.  (I tried it.)

Yup, that happened with your RE.  Although slow, the function you gave
me should work.  Thanks for your help.






-- 
Michael Bain                                            (206) 234-6942
Boeing Commercial Airplane Group           meb4593@icdfs.ca.boeing.com
Seattle, WA 98124

Newsgroups: comp.lang.perl
From: sommar@enea.se (Erland Sommarskog)
Subject: Another RE query
Organization: Enea Data AB
Date: Sun, 13 Dec 1992 15:03:25 GMT

According to the FAQ you cannot handle balanced text with Perl's
regular expressions, and it seems that what I'm trying to handle
is just that. But I'd like to check out with the expertise just 
in case.

Basically what I'm writing is a simple text formatter in which 
user-defined strings are converted to escape-sequences for enscript.
Those strings occurs in pairs to mark start and end of the text
to be in deviating font. Anyway, innocently I tried something
like:

    s!${start}((.|\n)*${stop}!${esc}F${ch1}$1${esc}F${ch2}!g

But of course I got bitten if the pair twice in the same paragraph.
(I read text paragraph by paragraph, a deliberate restriction.) Would
$stop be guaranteed to be one character long, it would be trivial:

    s!${start}([^${stop}]*)${stop}!${esc}F${ch1}$1${esc}F${ch2}!g

But $start and $stop can be any length, although would only expect
one or two characters in practice. But two characters is enough to
kill the idea. (Another problem is that the pairs may be nested,
but I ignore that case.)

Since it seems this can't be done with regular expressions, I've
redone the whole thing with index and substr like I would have
done in a more traditional language. Still I would to check out
that I didn't miss anything...
-- 
Erland Sommarskog - ENEA Data, Stockholm - sommar@enea.se
Newsgroups: comp.lang.perl
From: jfh@netcom.com (Jack Hamilton)
Subject: Perl class at Cal Extension
Organization: Netcom - Online Communication Services (408 241-9760 guest)
Date: Thu, 17 Dec 1992 04:11:21 GMT

I was mildly surprised to see that University at the University of
California at Berkeley is offering a Perl class next quarter (Wednesdays
6-9pm in Menlo Parl).  It says that "Perl is a new programming language
that combines the best features of C, awk, sed, and various shell
programming languages into a powerful and flexible language that is being
used by more and more people in the UNIX community."

Although many classes provide computer access, this one doesn't so you have
to have access to a Unix machine.  If you don't, and you have a PC, they
will provide you with an DOS version.  I'm sure that if Larry were dead
he'd be turning in his grave at the thought. 

It's in the department of electronic and computer engineering, and they
haven't yet decided whether to gice academic credit for it. 


-- 

-----------------------------------------------------------------------
Jack Hamilton   jfh@netcom.com   P. O. Box 281107   SF, CA   94128-1107
Newsgroups: comp.lang.perl
From: schrod@iti.informatik.th-darmstadt.de (Joachim Schrod)
Subject: Two bugs (and a patch for them) in perldb.pl
Date: Thu, 17 Dec 1992 18:37:38 GMT
Organization: TU Darmstadt

There are two small (but annoying) bugs in the Perl debugger,
perldb.pl: The command

 -- V does not take the current package name as the default
    (as the doc says it should)

 -- V (and, of course, X) does not output to DB'OUT, but on the
    selected output handle.
	If one debugs a routine which happens to write on a file it's
    rather interesting to think first `well, nothing happened' and
    finding the variables dump later in the output file... :) :) 
    Actually, that's because perldb.pl uses the package dumpvar.pl,
    which itself prints to the default output.

The following small patch suffices.

*** /usr/local/lib/perl/perldb.pl	Thu Sep 24 15:59:23 1992
--- perldb.pl	Thu Dec 17 19:28:09 1992
***************
*** 199,206 ****
  		    next CMD; };
  		$cmd =~ s/^X\b/V $package/;
  		$cmd =~ /^V$/ && do {
! 		    $cmd = 'V $package'; };
  		$cmd =~ /^V\b\s*(\S+)\s*(.*)/ && do {
  		    $packname = $1;
  		    @vars = split(' ',$2);
  		    do 'dumpvar.pl' unless defined &main'dumpvar;
--- 199,207 ----
  		    next CMD; };
  		$cmd =~ s/^X\b/V $package/;
  		$cmd =~ /^V$/ && do {
! 		    $cmd = "V $package"; };
  		$cmd =~ /^V\b\s*(\S+)\s*(.*)/ && do {
+ 		    local ($savout) = select(OUT);
  		    $packname = $1;
  		    @vars = split(' ',$2);
  		    do 'dumpvar.pl' unless defined &main'dumpvar;
***************
*** 210,215 ****
--- 211,217 ----
  		    else {
  			print DB'OUT "dumpvar.pl not available.\n";
  		    }
+ 		    select ($savout);
  		    next CMD; };
  		$cmd =~ /^f\b\s*(.*)/ && do {
  		    $file = $1;

--
Joachim

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Joachim Schrod			Email: schrod@iti.informatik.th-darmstadt.de
Computer Science Department
Technical University of Darmstadt, Germany
Newsgroups: comp.lang.perl