get file type info from lstat?

2004-03-13 Thread Xuer
Can I get the file type info from the result list of lstat? such as if it's a dir( as -d), or a slink( as -s) ...etc. how to ? thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: From Windows -> Linux

2004-03-13 Thread Owen Cook
On Sat, 13 Mar 2004, Robert wrote: > I will be going totally Linux for a variety of reasons. My question is > this. I have been using ActiveState for a while and use PPM but in one > sense it was kind of limiting because I would search CPAN and see > something I liked but not be able to try it

From Windows -> Linux

2004-03-13 Thread Robert
I will be going totally Linux for a variety of reasons. My question is this. I have been using ActiveState for a while and use PPM but in one sense it was kind of limiting because I would search CPAN and see something I liked but not be able to try it. Once I move to Linux that whole world open

Re: perl -d / apache server debug

2004-03-13 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mike Ni) writes: >I have at least 25 perl files written by a person who >isn't here anymore. All these perl script files were >programmed to serve the inquiry from the Internet via >the web server. > >For me to understand the logic behind all the

Re: help with a regex and greediness

2004-03-13 Thread R. Joseph Newton
Stuart White wrote: > the file format is not sloppy at all. I was just > confused as to why I couldn't use split on the first > space score comma and space, and then the next space > score. <-Perhaps I just answered my question right > there, seeing that in the second iteration, there is > no c

Re: help with a regex and greediness

2004-03-13 Thread R. Joseph Newton
Stuart White wrote: > $line = > "merlyn::118:10:Randal:/home/merlyn?/usr/bin/perl"; > @fields = s;oit(/:/,$line); > #now @fields is ("merlyn:, > "","118","10","Randal","/home/merlyn","/usr/bin/perl") I don't think so: Greetings! E:\d_drive\perlStuff>perl -w $line = "merlyn::118:10:Randal:/ho

Re: Improving performance when working with large text files

2004-03-13 Thread James Edward Gray II
On Mar 13, 2004, at 1:09 PM, R. Joseph Newton wrote: "West, William M" wrote: by slurping the WHOLE file into memory at once (do you have room to but a 45 megabyte file into memory?) the speed of the processing went up- Highly unlikely. There is no real speed advantage with Perl in slurping

Re: Read from tape device

2004-03-13 Thread R. Joseph Newton
Jakob Kofoed wrote: > Hi again, Hi, > Sorry for the delayed answer. Tha's okay, but please don't top-post. Instead trim out anything to which you are noit directly replying, and follow comments with your specific responses, then add anything new in a block following. It helps to keep the flo

Re: second-level string interpolation

2004-03-13 Thread Michael C. Davis
At 10:39 AM 3/13/04 -0800, R. Joseph Newton wrote: >> my $header = <<'end_of_header'; >> # File: $filename >> end_of_header >> >> my $filename = 'xyz'; >> print $header, "\n"; # output: want to see # File: xyz, but get # File: >> $filename > >I am not sure how the above is any m

Re: Improving performance when working with large text files

2004-03-13 Thread R. Joseph Newton
"West, William M" wrote: > by slurping the WHOLE file into memory at once (do you have room to but a 45 > megabyte file into memory?) the speed of the processing went up- Highly unlikely. There is no real speed advantage with Perl in slurping a file. The only good reason I can think of is if

Re: second-level string interpolation

2004-03-13 Thread R. Joseph Newton
"Michael C. Davis" wrote: > Hi, Apologies if I'm bringing up a repeated topic. I searched the list > archive and the web and nothing specific has turned up so far. > > Is there a way to defer evaluation of the contents of a here-doc-defined > value such that one can embed variables in the here-d

Re: help with a regex and greediness

2004-03-13 Thread Stuart White
--- Paul Johnson <[EMAIL PROTECTED]> wrote: > > Stuart White said: > > > I'm not sure what's going wrong here. Can someone > > tell me how I can split 'Spurs 94, Suns 82' into: > > array[0] == 'Spurs' and array[1] == 'Suns' > > @array = /([[:alpha:]]+)/g; > This did what I wanted it to do, t

Re: help with a regex and greediness

2004-03-13 Thread Stuart White
--- "R. Joseph Newton" <[EMAIL PROTECTED]> wrote: > Stuart White wrote: > > > Wow, yeah that helps a lot. > > Here's a question: If if had: > > $line = 'Spurs 94, Suns 82, Heat 99, Magic 74' > > and then did a split on comma and comma's > surrounding > > spaces: > > @result = split (/\s*,\s*/, $

Re: not getting the syntax

2004-03-13 Thread James Edward Gray II
On Mar 13, 2004, at 12:36 AM, R. Joseph Newton wrote: Charlotte Hee wrote: $byname{ Owen }{ PHONE } = '999-'; Should be: $byname{ Owen }->{ PHONE } = '999-'; are you using strict? The code above should cause an error, not just an uninitialized variable warning. This isn't true. The ar