Re: How does opendir/readdir process files

2015-01-15 Thread Brandon McCaig
On Thu, Jan 15, 2015 at 05:27:03PM -0500, Harry Putnam wrote: > Now I really have to ask what that even means. > > When Brandan said that to me... other than the RTFM it sailed > right over my head... so what does tl;dr mean? http://www.urbandictionary.com/define.php?term=tl%3Bdr Regards, --

Re: How does opendir/readdir process files

2015-01-15 Thread Shawn H Corey
On Thu, 15 Jan 2015 17:27:03 -0500 Harry Putnam wrote: > When Brandan said that to me... other than the RTFM it sailed right > over my head... so what does tl;dr mean? tl;dr == too long; didn't read -- Don't stop where the ink does. Shawn -- To unsubscribe, e-mail: beginners-unsubs

Re: How does opendir/readdir process files

2015-01-15 Thread Harry Putnam
John SJ Anderson writes: > On Tue, Jan 13, 2015 at 7:40 PM, Brandon McCaig wrote: >> Harry: >> >> (Expect typographical errors in such a long post...) >> >> tl;dr? RTFM. > Please don't tell people that. It's not helpful, it's not a helpful > attitude, and it's really not welcome here. > > The

Re: How does opendir/readdir process files

2015-01-14 Thread John SJ Anderson
On Tue, Jan 13, 2015 at 7:40 PM, Brandon McCaig wrote: > Harry: > > (Expect typographical errors in such a long post...) > > tl;dr? RTFM. Please don't tell people that. It's not helpful, it's not a helpful attitude, and it's really not welcome here. The rest of your post may be excellent, but I

Re: How does opendir/readdir process files

2015-01-14 Thread Shawn H Corey
On Tue, 13 Jan 2015 22:40:46 -0500 Brandon McCaig wrote: > my @files = map { $_->[0] } >sort { $a cmp $b } sort { $a->[1] <=> $b->[1] } >map {[$_, (stat("$dir/$_"))[9] ] } >grep { ! /^\./ && -f

Re: How does opendir/readdir process files

2015-01-13 Thread Brandon McCaig
On Tue, Jan 13, 2015 at 10:40:46PM -0500, Brandon McCaig wrote: > to spend some quality time with The Revelant Manuals (TFM). I cite this as proof that I am TFT (too fucking tired). I'm not going to confess how proud I was of this word play before I realized that it was completely nonsensical. -t

Re: How does opendir/readdir process files

2015-01-13 Thread Brandon McCaig
Harry: (Expect typographical errors in such a long post...) tl;dr? RTFM. On Fri, Jan 09, 2015 at 08:26:55PM -0500, Harry Putnam wrote: > I'm taxing peoples patience I suppose but being considerably thick of > skull I cannot just look at this and see what it does. > > > my @files = map { $_->[0]

Re: How does opendir/readdir process files

2015-01-13 Thread Charles DeRykus
> ... > I think the normal and original behavior is no reference. I think > they added the reference in 5.14 too. Perhaps the documentation > just fails to mention that support for arrays was added in 5.14 > along with references? Hopefully I got that right this time. :) > Ah, RTFM would've helped

Re: How does opendir/readdir process files

2015-01-13 Thread Brandon McCaig
Charles: On Fri, Jan 09, 2015 at 11:02:28AM -0800, Charles DeRykus wrote: > Definitely needs a 'use 5.014' if you want to dabble. You appear to be correct. Hmmm, I didn't figure that from the documentation. Either I read it wrong or it's not documented well. > Apparently undocumented that you

Re: How does opendir/readdir process files

2015-01-09 Thread Harry Putnam
Dermot writes: First, thanks for you helpful input and examples. I'm taxing peoples patience I suppose but being considerably thick of skull I cannot just look at this and see what it does. > my @files = map { $_->[0] } >sort { $a cmp $b } >map {[$_, (sta

Re: How does opendir/readdir process files

2015-01-09 Thread Charles DeRykus
On Fri, Jan 9, 2015 at 10:31 AM, Brandon McCaig wrote: > Charles: > > On Fri, Jan 9, 2015 at 12:46 PM, Charles DeRykus wrote: >> On Fri, Jan 9, 2015 at 3:39 AM, Dermot wrote: >>> I think John has answered your immediate question. >>> >>> ... >>> for (0..$#files) { >>> print "$_) $files[$_]\n

Re: How does opendir/readdir process files

2015-01-09 Thread Brandon McCaig
Charles: On Fri, Jan 9, 2015 at 12:46 PM, Charles DeRykus wrote: > On Fri, Jan 9, 2015 at 3:39 AM, Dermot wrote: >> I think John has answered your immediate question. >> >> ... >> for (0..$#files) { >> print "$_) $files[$_]\n"; >> } >> > > Alternatively (at least since 5.14) : > > > say "$k)

Re: How does opendir/readdir process files

2015-01-09 Thread Charles DeRykus
On Fri, Jan 9, 2015 at 3:39 AM, Dermot wrote: > I think John has answered your immediate question. > > ... > for (0..$#files) { > print "$_) $files[$_]\n"; > } > Alternatively (at least since 5.14) : say "$k) $v" while ($k,$v) = each @files; -- Charles DeRykus -- To unsubscribe, e-mail:

Re: How does opendir/readdir process files

2015-01-09 Thread Dermot
readdir with a grep in there to find specific > filenames, how does that process collect the files? > > I mean will the generated @ar of files be oldest first or someother > reliable order? > > Using an example paraphrased from perldoc -f readdir: > (I changed the reg

Re: How does opendir/readdir process files

2015-01-08 Thread John SJ Anderson
On Thu, Jan 8, 2015 at 5:52 PM, Harry Putnam wrote: > Opening a directory and readdir with a grep in there to find specific > filenames, how does that process collect the files? See http://www.perlmonks.org/?node_id=533744 tl;dr: it depends on your OS. > I mean will the generated @ar of files

How does opendir/readdir process files

2015-01-08 Thread Harry Putnam
Opening a directory and readdir with a grep in there to find specific filenames, how does that process collect the files? I mean will the generated @ar of files be oldest first or someother reliable order? Using an example paraphrased from perldoc -f readdir: (I changed the regex) opendir(my

Re: opendir

2008-02-10 Thread David Moreno
Heh. "kooks", I might code some Perl next time I hop on my surfboard :) D. On Feb 10, 2008 12:59 PM, Randal L. Schwartz <[EMAIL PROTECTED]> wrote: > > "MK" == MK <[EMAIL PROTECTED]> writes: > > MK> On 02/09/2008 12:31:33 PM, David Moreno wrote: > -> Heh, why? > > MK> shucks i figured it out

Re: opendir

2008-02-10 Thread John W. Krahn
MK wrote: i am trying to create a perl routine to traverse directories (like a file browser) that will be incorporated into a more specific framework, but for some incomprehensible (to me) reason, opendir will not produce correct information when called in a sub!!! Why (the exact same script

Re: opendir

2008-02-10 Thread Randal L. Schwartz
> "MK" == MK <[EMAIL PROTECTED]> writes: MK> On 02/09/2008 12:31:33 PM, David Moreno wrote: -> Heh, why? MK> shucks i figured it out. y'all are kooks and i'll let you know when i MK> have a REAL question. Yes, people who want to answer properly phrased questions by beginners are "kooks".

Re: opendir

2008-02-09 Thread MK
On 02/09/2008 12:31:33 PM, David Moreno wrote: -> Heh, why? shucks i figured it out. y'all are kooks and i'll let you know when i have a REAL question. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: opendir

2008-02-09 Thread Jerald Sheets
SOMEbody's using Windows. :) --jms On Feb 9, 2008, at 7:50 AM, Telemachus wrote: In perl.beginners, [EMAIL PROTECTED] wrote: see attached Please include the code in your post. We don't want to open your attachments. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: opendir

2008-02-09 Thread David Moreno
Heh, why? On Feb 9, 2008 10:21 AM, MK <[EMAIL PROTECTED]> wrote: > hey sorry, cancel that > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > >

Re: opendir

2008-02-09 Thread Telemachus
In perl.beginners, [EMAIL PROTECTED] wrote: > see attached Please include the code in your post. We don't want to open your attachments. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: opendir

2008-02-09 Thread MK
hey sorry, cancel that -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

opendir

2008-02-09 Thread MK
i am trying to create a perl routine to traverse directories (like a file browser) that will be incorporated into a more specific framework, but for some incomprehensible (to me) reason, opendir will not produce correct information when called in a sub!!! Why (the exact same script works

Re: opendir grep push question

2007-10-03 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hello, Hello, did someone know why the code1 version works and the condensed code2 don't?? $TempShapes_folder is something like 'C:.../TempShapes/ code1: opendir(DIR, "$TempShapes_folder") || die "folder not found: $!"; @File

opendir grep push question

2007-10-03 Thread [EMAIL PROTECTED]
Hello, did someone know why the code1 version works and the condensed code2 don't?? $TempShapes_folder is something like 'C:.../TempShapes/ Thank you! Guenter code1: opendir(DIR, "$TempShapes_folder") || die "folder not found: $!"; @File_list_TempShape

RE: opendir question

2003-07-29 Thread Bob Showalter
Peter Fleck wrote: > This isn't 'production' code. I'm playing with this to get ready to > use the commands in a project. That's why I'm doing the same thing in > two different ways. > > I have two ways of of getting a list of file names below, w

opendir question

2003-07-29 Thread Peter Fleck
This isn't 'production' code. I'm playing with this to get ready to use the commands in a project. That's why I'm doing the same thing in two different ways. I have two ways of of getting a list of file names below, working with opendir and readdir. The second me

Re: about permissions and using opendir()

2002-11-27 Thread Ramprasad A Padmanabhan
you require a *pseudo* A script that can execute as root even if run by httpd user Ernesto Freyre wrote: Dear Sirs: Please I would want some suggestion about the problem I facing: I have a cgi perl script executed as the httpd user, that need to access at certain time some directories that th

about permissions and using opendir()

2002-11-27 Thread Ernesto Freyre
Dear Sirs: Please I would want some suggestion about the problem I facing: I have a cgi perl script executed as the httpd user, that need to access at certain time some directories that their owner are other users, and I don“t must to set their rights for be readable for other users, then how

RE: opendir questions

2002-11-20 Thread Kipp, James
e"}; > my $maildir = "$dir/\*\-mail/"; > print "$name has $dir and $maildir\n"; > opendir( MAILDIR, "$maildir" ) || die "what the: $!"; > my @mail = grep -T, readdir MAILDIR; > closedir MAILDIR; > print

Re: opendir questions

2002-11-20 Thread John W. Krahn
Chad Kellerman wrote: > > Hi everyone, Hello, >I am having a small problem with opendir: > > #!/usr/bin/perl -w > > # getting disk usage for users > # not quite as good as du(1) but alittle faster...maybe > # written by [EMAIL PROTECTED] > # Aug 17, 2002 >

opendir questions

2002-11-20 Thread chad kellerman
Hi everyone, I am having a small problem with opendir: #!/usr/bin/perl -w # getting disk usage for users # not quite as good as du(1) but alittle faster...maybe # written by [EMAIL PROTECTED] # Aug 17, 2002 use strict; use diagnostics; $|++; my ( $name, $uid, $dir ); while ( ( $name

RE: Should I use -e -d or opendir ?

2002-01-10 Thread Michael Stidham
EMAIL PROTECTED] >Subject: RE: Should I use -e -d or opendir ? >Date: Thu, 10 Jan 2002 08:49:17 -0500 > > > -Original Message- > > From: K.L. Hayes [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, January 10, 2002 12:28 AM > > To: [EMAIL PROTECTED] > > Sub

RE: Should I use -e -d or opendir ?

2002-01-10 Thread Bob Showalter
> -Original Message- > From: K.L. Hayes [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 10, 2002 12:28 AM > To: [EMAIL PROTECTED] > Subject: Should I use -e -d or opendir ? > > > Hello All, > > I've found lot's of info on how to check if a

Re[2]: Should I use -e -d or opendir ?

2002-01-09 Thread K.L. Hayes
uot;writable"} else {print "NOT writable"} JWK> if (-x _) {print "executable"} else {print "NOT executable"} JWK> if (-e _) {print "exists"} else {print "NOT exists"} JWK> if (-s _) {print "size"} else {print "NO siz

Re: Should I use -e -d or opendir ?

2002-01-09 Thread John W. Krahn
nt "NOT writable"} if (-x _) {print "executable"} else {print "NOT executable"} if (-e _) {print "exists"} else {print "NOT exists"} if (-s _) {print "size"} else {print "NO size"} ' bin NOT a file directory readable writable

Should I use -e -d or opendir ?

2002-01-09 Thread K.L. Hayes
" or knows of a better way I'd appreciate the help. Thank you. use constant USER_PATH => '/home/~client/htdocs/clients/'; $path = USER_PATH . $personal_key; ## Is This Correct? ## if (-e "$path") { &get_on_with_it } else { &errorMsg } ## Or