| cowbud | I am looking to run a function that returns a recursive listing of a directory, I have looked at File::Find but it won't give me a list I can only process the files in order, any suggestions what I should look at? Preferably a built in module.. |
| revdiablo | cowbud: Use File::Find to create a list? |
| tabris|away | write your own. it's not that hard. |
| buu | cowbud: There's a.. File::Find::Rule or some such That will do that. |
| tabris|away | the only trick to worry about is recursive symlinks |
| bpalmer | find2perl . -print <-- now change the print in the output script to be a push into your collecting variable |
| cowbud | buu: ill take a look thanks bpalmer: I don't want to use global shit |
| buu | You don't have to use globals. |
| cowbud | err stuff really? |
| buu | Create a closure that pushes onto a lexical. sub foo { my @x; find(sub { push @x, $_ } }); |
| zamolxes | well, you probably need to use $File::Find::name isntead of $_ |
| cowbud | buu: ahh I had something similar but Ihad an error so I thought it wasn't possible thanks man :) |
| Neophyte | Hello, I have a question. I just downloaded ActivePerl for Windows XP, saved it in \usr\ . I wanted to see if Perl would work so I made a simple Hello World program. I went to C: made a folder called perl scripts, wrote out the Hello World Code with #!/usr/bin/perl, went in run cmd and typed cd c:\perlscripts, then hello.pl -- and I get an error. Can someone help me? |
| dec | You didn't even say what the error is. |
| Neophyte | I'll type the error out. |
| Jmax- | #!C/usr/perl ## or something, i'm sure there are active state FAQs on the matter |
| Khisanth | that sounds like the wrong procedure for windows |
| Neophyte | Backslash found where operator expected at C:\perlscripts\hello.pl line 1, near "rtf1\" "ansi\" "ansicpg1252\" and it goes on... for about 5 lines |
| Khisanth | the shebang doesn't matter except for the switches IIRC |
| mauke | did you write your script in word? |
| Neophyte | YES word |
| mauke | excellent (NOT) |
| Neophyte | So notepad? :P |
| rob | ... |
| Neophyte | I am a newbie, sorry. So write it from notepad? |
| revdiablo | Yes |
| mauke | any text editor will work |
| Neophyte | Word didnt work why? |
| sili | notepad won't work \r\n = break |