Re: regex help

2007-08-02 Thread Ricky Zhou
rch for greedy. Basically, the .* matches as much as possible, so it gets the spaces as well. To make it not greedy, you add a ?, so $string =~ s/^\s+(.*?)\s+$/$1/; would work. Hope this helps, Ricky -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFGskSdZBKKLMyvSE

Re: Precedence?

2007-07-29 Thread Ricky Zhou
000 * 100 = -0.1 * 100 = -10 If it were ($end - $start) / ($start * 100), *then* it would be different (just go by the order of operations, or perldoc perlop). > #!/usr/bin/perl > use warnings; Try using strict as well :) Hope this helps, Ricky -BEGIN PGP SIGNATURE- Version: GnuPG v1

Re: Beginner needs help

2007-06-27 Thread Ricky Zhou
the backup from one server from the > previous night to the backup server every morning. > > > > Any ideas on where to start would be greatly appreciated. To be honest, this really sounds like the jobs for a cronjob and a shell script, at most. Are you sure that you even need Per

Re: Substituting string in many files

2007-04-07 Thread Ricky Zhou
server-side scripting, huh? :( Try $ perl -pi.orig -e '[EMAIL PROTECTED]@[EMAIL PROTECTED]' *.php This will replace .html with .php in all .php files, creating backups of the old files at file.php.orig. You can couple this with a find command to traverse several levels of directories, etc

Re: Not Sure how to start or what to use

2007-02-28 Thread Ricky Zhou
o/File-Split-0.30/lib/File/Split.pm Hope this helps, Ricky -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF5hrLiXbZ7NjlUcARAptpAJ9BJblYudMGY2GIaPyikXyOffaiGACeLo6X QARf5v4S8qHUULwq/+jJ41U= =EYRA -END PGP SIGNATURE- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: Remote directory

2007-01-11 Thread Ricky Zhou
is a list of file checks (you probably want -e for files and -d for directories). Hope this helps, Ricky -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFpr8LiXbZ7NjlUcARAlzbAJsE9ZSMWxuRvSY/v7hHaH/T7XGCzQCgoO0R fOFiubVxOTVVHNLxPqQjdJo= =VV6r -END PGP SIGNATURE

Re: Perl script to search and replace a string in a file

2006-05-31 Thread Ricky Zhou
nd with this one-liner might be easier than a full-fledged Perl script. Hope this helps, Ricky -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Perl OS system equivalence or Perl scripts for UNIX-and-Windows

2006-05-25 Thread Ricky Zhou
mputers (and you want absolutely minimal modification), you might want to consider environments such as Cygwin (http://www.cygwin.com/). Hope this helps, Ricky

Re: file list

2006-05-22 Thread Ricky Zhou
re's a more fitting module, but File::Find should do the job: http://search.cpan.org/~nwclark/perl-5.8.8/lib/File/Find.pm (And it's a core module). Hope this helps, Ricky

Re: ssi and Perl/CGI

2006-05-14 Thread Ricky Zhou
ml , for example). For your specific problem, try using (For exec, it's exec cmd, not exec cgi). Hope this helps, Ricky

Re: to open a gnome file browser

2006-04-22 Thread Ricky Zhou
> how can i open a gnome file browser through perl ? Try this: system("/usr/bin/nautilus --browser --no-desktop ."); Or: system("/usr/bin/nautilus --browser --no-desktop . &"); If you want to run it in the background (and let your Perl program continue). Hope that help

Re: How can I distrubit a Perl execute envrioment

2002-03-02 Thread Ricky
the clients, we run it from the > network by adding a line like this at the end of the batch file: > > \\server\perlexec\bin\perl.exe \\server\plfiles\myscript.pl > > > -Original Message- > From: Ricky [mailto:[EMAIL PROTECTED]] > Sent: Friday, March 01, 2002 10:32 AM >

Re: How can I distrubit a Perl execute envrioment

2002-03-01 Thread Ricky
running your script on more than > one computer. > > -Original Message- > From: Ricky > To: [EMAIL PROTECTED] > Sent: 2/28/02 10:11 PM > Subject: How can I distrubit a Perl execute envrioment > > I program a perl Tk program to access MySQL database. The distribution I >

How can I distrubit a Perl execute envrioment

2002-02-28 Thread Ricky
I program a perl Tk program to access MySQL database. The distribution I use is Active Perl. When I work with my program, I use Active State Perl's PPM download DBI, PerlTK and MySQL DBD. Now I want to make this program working on other computer which can't access internet. How can I distribute my

Complie perl with Tk

2002-02-08 Thread Ricky
Can I use perlcc compile a perl program with Tk and DBD:mysql into .exe file on windows? How to make the command line? Thanks! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]