Re: Why glob() ?

2005-11-13 Thread Guillaume R.
> Gustav> Hi there! Lo >Gustav> ps. I don't have the manual or Perl installed on this >computer... U should install so. Playing with perl without the docs is like playing football without the ball... Why don't u install it? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Re: regex compares

2005-11-13 Thread John Doe
Pant, Hridyesh am Montag, 14. November 2005 04.39: > What does this regex compares > > my $patternDir = '^[a-zA-Z0-9/_.\[\]-]*$' It does compare nothing, it is just assigned to $patternDir. When used, for instance in $filename=~/$patternDir/; it _matches_ if $filename is empty or contai

RE: filter

2005-11-13 Thread Charles K. Clarkson
Tom Allison wrote: : I was at the YAPC::NA this year and saw someone using something : called : : FILTER{ : : } : : Or something like that in their code. I'm taking this from memory, : but I was not familiar with the statement, 'FILTER'. : : Where does this come fro

Re: filter

2005-11-13 Thread Michael Glaesemann
On Nov 14, 2005, at 13:04 , Tom Allison wrote: I was at the YAPC::NA this year and saw someone using something called FILTER{ } Or something like that in their code. I'm taking this from memory, but I was not familiar with the statement, 'FILTER'. I wasn't there and I'm no perl expert b

filter

2005-11-13 Thread Tom Allison
I was at the YAPC::NA this year and saw someone using something called FILTER{ } Or something like that in their code. I'm taking this from memory, but I was not familiar with the statement, 'FILTER'. Where does this come from? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co

Re: combining array ref's

2005-11-13 Thread Tom Allison
John W. Krahn wrote: Mike Blezien wrote: Hello, Hello, what is the most effecient way to combine multiple array refs into one array ref, IE: my $arrayrefA = ['1',2','3']; my $arrayrefB = ['4','5','6']; my $arrayrefC = ['7','8','9']; my $allarrayref = (Combine $arrayrefA $arrayrefB $arra

Re: info pls

2005-11-13 Thread Tom Allison
Ssavitha wrote: Hi, Pls. let me know the connection string in perl script to connect to SQL server. Please let us know when you RTFM and don't forget to read DBI and don't forget that it depends on the database and you might even been using DBI::Class. -- To unsubscribe, e-mail: [EMAIL

Re: Why glob() ?

2005-11-13 Thread Tom Allison
Gustav Wiberg wrote: Hi again! If I understood it right... @list = glob('*.txt'); would return all files that ends with *.txt in current directory? Usually. If there are a lot of files in the directory, this will file. About the same time that the shell command 'rm' or 'ls' will faile if y

Re: Why glob() ?

2005-11-13 Thread Tom Allison
Randal L. Schwartz wrote: "Gustav" == Gustav Wiberg <[EMAIL PROTECTED]> writes: Gustav> Why to use glob()-command when I can use exec() ??? I don't get it... In modern Perl, glob() is internal, where exec/system/backquote/pipes are external, so it's very likely faster to use glob, perhaps ten

regex compares

2005-11-13 Thread Pant, Hridyesh
What does this regex compares my $patternDir = '^[a-zA-Z0-9/_.\[\]-]*$' Thanks Hridyesh -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: What is "shift" ?

2005-11-13 Thread Ricardo SIGNES
* Dylan Stamat <[EMAIL PROTECTED]> [2005-11-13T22:19:17] > No, not the routine that deals with Arrays ! If you don't know what it is, why are you making assumptions, or telling us what it isn't? If you don't know, don't assume! > I see code like the following, everywhere: > my $coolvariable = sh

What is "shift" ?

2005-11-13 Thread Dylan Stamat
No, not the routine that deals with Arrays ! I see code like the following, everywhere: my $coolvariable = shift; Why is a new scalar being assigned to "shift" ? New to Perl... sorry for the lame question, but couldn't find an answer anywhere. Thanks !

Re: tricky problem about stat function

2005-11-13 Thread Jeff 'japhy' Pinyan
On Nov 13, ZHAO, BING said: opendir GOP, "SCRATCH/BACKUP" or die "cannot open directory SCRATCH/BACKUP:$!"; my @smm=grep{($_ ne ".") && ($_ ne "..")} readdir GOP; foreach (@smm){ my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat

Re: tricky problem about stat function-follow up

2005-11-13 Thread ZHAO, BING
On Sun, 13 Nov 2005 17:36:39 -0800 "ZHAO, BING" <[EMAIL PROTECTED]> wrote: opendir GOP, "SCRATCH/BACKUP" or die "cannot open directory SCRATCH/BACKUP:$!"; my @smm=grep{($_ ne ".") && ($_ ne "..")} readdir GOP; foreach (@smm){ my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime,

tricky problem about stat function

2005-11-13 Thread ZHAO, BING
opendir GOP, "SCRATCH/BACKUP" or die "cannot open directory SCRATCH/BACKUP:$!"; my @smm=grep{($_ ne ".") && ($_ ne "..")} readdir GOP; foreach (@smm){ my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat($_); print $ctime; } cl