File Management

2005-07-22 Thread Joel Divekar
Hi All We have a windoz based file server with thousand of user accounts. Each user is having thousand of files in his home directory. Most of these files are duplicate / modified or updated version of the existing files. These files are either .doc or . xls or .ppt files which are shared by group

Re: search and replace

2005-07-22 Thread Tom Allison
Brent Clark wrote: Hi all Think I have a better unstanding of the use of () for my regex search, but this morning I have a new set of problems, whereby I need to perform a search and replace and then pass on to the new variable. My current code is as so, and works: $_ =~ s/(^\w+\.dat\|)//;

Re: wildcard matching

2005-07-22 Thread Jeff 'japhy' Pinyan
On Jul 22, dan said: the wildcard search could be anything like an exact match with no wildcards in, or a proper wildcarded search. such as: *.co.uk someones.hostname.com Do you plan on allowing the '?' wildcard to match any single character? Just curious how robust this should be. sub wcm

Re: wildcard matching

2005-07-22 Thread John W. Krahn
dan wrote: > hi Hello, > i have a bit of a puzzling question. well, puzzling to me anyway. > i have a sub which is passed 2 arguments. a wildcard search, and an actual > string to search in. > the wildcard search could be anything like an exact match with no wildcards > in, or a proper wildcarded

RE: How to use % in MySQL SQL statement from Perl?

2005-07-22 Thread Siegfried Heintze
Thanks Tom, I tried your suggestion but no luck. Still no results. I'm running 4.0.23 of MySQL and 8.4+ of ActiveState. I wonder if this is a bug in DBI? Siegfried -Original Message- From: Tom Allison [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 8:08 PM To: Siegfried Heintze

wildcard matching

2005-07-22 Thread dan
hi i have a bit of a puzzling question. well, puzzling to me anyway. i have a sub which is passed 2 arguments. a wildcard search, and an actual string to search in. the wildcard search could be anything like an exact match with no wildcards in, or a proper wildcarded search. such as: *.co.uk someon

RE: File::Find if match rename

2005-07-22 Thread Brian Volk
> -Original Message- > From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] > Sent: Friday, July 22, 2005 11:44 AM > To: Brian Volk > Cc: Beginners (E-mail) > Subject: Re: File::Find if match rename > > > On Jul 22, Brian Volk said: > > > I have two text files and I have a directory of

Re: Help Please!!! External APP passing value to Perl- Problem Resolved

2005-07-22 Thread Perl
Jeff, Thanks a lot for your reply. Acutally external APP was passing value to command prompt so the first option did work. "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Jul 22, Perl said: > > > what can be the syntex of assigning a variable (my $path) i

Re: Control Structure Question

2005-07-22 Thread Jeff 'japhy' Pinyan
On Jul 22, Dave Adams said: The following code looks too rigid, how can I achieve the same result using one of the control structure (foreach, for, etc)? my @today = Today(); my $year_now = $today[0]; my $month_now = $today[1]; my $day_now = $today[2]; Well, first of all, that could just be

Control Structure Question

2005-07-22 Thread Dave Adams
The following code looks too rigid, how can I achieve the same result using one of the control structure (foreach, for, etc)? #!/usr/bin/perl -w use strict; use Date::Calc qw(:all); my @today = Today(); my $year_now = $today[0]; my $month_now = $today[1]; my $day_now = $today[2]; print ($year_n

Re: code improvement using LABELS within subroutines????

2005-07-22 Thread DBSMITH
thank you, I will consider all of these. derek "Scott R. Godin" <[EMAIL PROTECTED] .net

Re: code improvement using LABELS within subroutines????

2005-07-22 Thread Scott R. Godin
Jeff 'japhy' Pinyan wrote: On Jul 21, [EMAIL PROTECTED] said: ok thanks but that does not really help. Sorry. your right about finger(), but based on my code I want to execute a certain block label if ( mary) finger (mary) if (jim) finger(jim) Oh, then in that case: finger($user);

Re: File::Find if match rename

2005-07-22 Thread Jeff 'japhy' Pinyan
On Jul 22, Brian Volk said: I have two text files and I have a directory of .pdf files that are named 00020.pdf 00035.pdf 00040.pdf 00067.pdf. ( same as records in file_2 ) What I need to do is look at each record in file_2 and see if the .pdf file exist.. if so copy that file to a new director

Re: File::Find if match rename

2005-07-22 Thread Xavier Noria
On Jul 22, 2005, at 17:16, Brian Volk wrote: #!/usr/bin/perl -w use strict; use File::Find; my $item_nums = 'c:/brian/spartan/hp_items.txt' ; my $mfg_nums ='c:/brian/spartan/mfg_num.txt' ; open(ITEM_NUMS, "<", $item_nums) or die "couldn't read item_nums: $!"; open(MFG_NUMS, "<", $mfg_nums) or

Re: Help Please!!! External APP passing value to Perl

2005-07-22 Thread Jeff 'japhy' Pinyan
On Jul 22, Perl said: what can be the syntex of assigning a variable (my $path) in perl which is taking value (for example c:\documents\script.txt) from an expternal APP. How is your program getting passed this value? On the command-line? If so, then you would access the value from the @A

Help Please!!! External APP passing value to Perl

2005-07-22 Thread Perl
Hello Listners, I am totally novice in perland I need help with that script. what can be the syntex of assigning a variable (my $path) in perl which is taking value (for example c:\documents\script.txt) from an expternal APP. The script will actually parse the my$path value (C:\documents\script.

File::Find if match rename

2005-07-22 Thread Brian Volk
Hi all, file_1( item_nums ) file_2 ( mfg_nums ) 70624.pdf 00020.pdf 70280.pdf 00020.pdf 70387.pdf 00020.pdf 70207.pdf 00035.pdf 30317.pdf 00035.pdf 70777.pdf 00040.pdf 70332.pdf 00067.pdf 70445.pdf

Re: search and replace

2005-07-22 Thread Jeff 'japhy' Pinyan
On Jul 22, Brent Clark said: Think I have a better unstanding of the use of () for my regex search, but this morning I have a new set of problems, whereby I need to perform a search and replace and then pass on to the new variable. My current code is as so, and works: $_ =~ s/(^\w+\.dat\|)//

Re: Problems creating a simple variable

2005-07-22 Thread Danijel Tasov
[EMAIL PROTECTED] (Dave Adams) wrote: > use Time::localtime; > my $tm = localtime; > printf("The current date is > %04d%02d%02d\n",$tm->year+1900,($tm->mon)+1, $tm->mday); > my $currentdate = ?? > print ($currentdate); As others mentioned, you need sprintf. But just another hint: #!/usr/bin/p

search and replace

2005-07-22 Thread Brent Clark
Hi all Think I have a better unstanding of the use of () for my regex search, but this morning I have a new set of problems, whereby I need to perform a search and replace and then pass on to the new variable. My current code is as so, and works: $_ =~ s/(^\w+\.dat\|)//;

RE: Replacing printf by print

2005-07-22 Thread pradeep.goel
Thanks a million. Best Regards, Pradeep -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 6:00 PM To: Pradeep Goel (WT01 - TELECOM SOLUTIONS) Cc: beginners@perl.org Subject: RE: Replacing printf by print On Jul 22, [EMAIL PROTECTED] said:

RE: setting a user passwd

2005-07-22 Thread Bob Showalter
Victor Pezo wrote: > Hi, I am developing a program that sets passwd for any user but i > dont want the operator sets the passwd. I want to give it as a result > of a function > > [EMAIL PROTECTED] victor]$ perl passwd.pl victor1 > > #!/usr/bin/perl > $usuario=$ARGV[0]; > $passwd="PASSWDGENERAT

Re: [SPAM DETECT] Re: Replcaing printf by print

2005-07-22 Thread Xavier Noria
On Jul 22, 2005, at 14:00, Jeff 'japhy' Pinyan wrote: On Jul 22, [EMAIL PROTECTED] said: Does replacing printf by print make any difference in the program? Especially at places where there is no format string passed or just $_ is passed? It probably doesn't have a noticeable difference

RE: Replacing printf by print

2005-07-22 Thread Jeff 'japhy' Pinyan
On Jul 22, [EMAIL PROTECTED] said: I am replacing it since there are some % sign in the strings being passed making the program crash. Replacement solves the problem as such, but wanted to countercheck, If these replacements could create any problem anywhere else! , or lator in the program? Th

RE: Replacing printf by print

2005-07-22 Thread pradeep.goel
That's the whole problem. I am replacing it since there are some % sign in the strings being passed making the program crash. Replacement solves the problem as such, but wanted to countercheck, If these replacements could create any problem anywhere else! , or lator in the program? (Although I don

Re: Replcaing printf by print

2005-07-22 Thread Jeff 'japhy' Pinyan
On Jul 22, [EMAIL PROTECTED] said: Does replacing printf by print make any difference in the program? Especially at places where there is no format string passed or just $_ is passed? It probably doesn't have a noticeable difference unless you compare the running of it many, MANY times. But

Replcaing printf by print

2005-07-22 Thread pradeep.goel
Hi, Does replacing printf by print make any difference in the program? Especially at places where there is no format string passed or just $_ is passed? Regards, Pradeep Confidentiality Notice The information contained in this electronic message and any attachments to this message are inte

Re: pointer

2005-07-22 Thread Jeff 'japhy' Pinyan
On Jul 22, Beast said: I found this code on some script : *test = \&show; What is "*" means? Isn't that reference/pointer is using "\" symbol? *foo is a typeglob. It's a way of representing everything named "foo": the scalar $foo, the array @foo, the hash %foo, the subroutine &foo, the fi

RE: pointer

2005-07-22 Thread Charles K. Clarkson
Beast wrote: : I found this code on some script : : : *test = \&show; : : What is "*" means? Isn't that reference/pointer is using "\" symbol? Read the Typeglobs and Filehandles section of the 'perldata' file for details. HTH, Charles K. Clarkson -- Mobile Hom

pointer

2005-07-22 Thread Beast
I found this code on some script : *test = \&show; What is "*" means? Isn't that reference/pointer is using "\" symbol? -- --beast -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]