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
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
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
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
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
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
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>
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'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
ml , for
example).
For your specific problem, try using
(For exec, it's exec cmd, not exec cgi).
Hope this helps,
Ricky
> 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
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
>
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
>
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
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]
15 matches
Mail list logo