On 2007-04-07 17:31, Olivier Regnier [EMAIL PROTECTED] wrote:
Hello,
I have a problem with my perl script with the command sed. Here is a
example of my code:
Don't use system(sed ...) in Perl. It's considered poor style, since
Perl can do the same without having to fork a shell/sed process.
Giorgos Keramidas wrote:
On 2007-04-07 17:31, Olivier Regnier [EMAIL PROTECTED] wrote:
Hello,
I have a problem with my perl script with the command sed. Here is a
example of my code:
Don't use system(sed ...) in Perl. It's considered poor style, since
Perl can do the same without having
Interesting. Is that old perl syntax (v4, etc)? Just curious because
most of the documentation and examples switched to:
No, he's using a function prototype. In this particular case, he's
saying the supfile_set_default_host function will take two scalars as
arguments.
For more info:
perldoc
Giorgos Keramidas a écrit :
On 2007-04-07 17:31, Olivier Regnier [EMAIL PROTECTED] wrote:
Hello,
I have a problem with my perl script with the command sed. Here is a
example of my code:
Don't use system(sed ...) in Perl. It's considered poor style, since
Perl can do the same without
Olivier Regnier wrote:
Giorgos Keramidas a écrit :
On 2007-04-07 17:31, Olivier Regnier [EMAIL PROTECTED] wrote:
Hello,
I have a problem with my perl script with the command sed. Here is a
example of my code:
Don't use system(sed ...) in Perl. It's considered poor style, since
On 2007-04-08 11:40, Olivier Regnier [EMAIL PROTECTED] wrote:
Giorgos Keramidas a ?crit :
Try using Perl only, instead of forking sed(1), like this:
,---
|
| #!/usr/bin/perl -Tw
|
| use strict;
|
| #
| #
On 2007-04-08 09:28, Garrett Cooper [EMAIL PROTECTED] wrote:
Olivier Regnier wrote:
The file has to exist that you're trying to modify, otherwise it'll give
up :). Permissions issue?
Better to do that section may be:
my $tmpsupfile;
my $supfile = /etc/standard-supfile;
my
On 2007-04-08 00:26, Garrett Cooper [EMAIL PROTECTED] wrote:
Giorgos Keramidas wrote:
Try using Perl only, instead of forking sed(1), like this:
[...]
| sub supfile_set_default_host($$);
| sub supfile_set_default_host($$)
| {
[...]
Interesting. Is that old perl syntax (v4, etc)? Just
On Sat, 7 Apr 2007, Olivier Regnier wrote:
I have a problem with my perl script with the command sed. Here is a example
of my code:
# Selecting the fast server
print Using the server called $server;
system(`/usr/bin/sed 's|\*default host=\(.*\)|\*default host=${server}|'
$standard_supfile
Warren Block a écrit :
On Sat, 7 Apr 2007, Olivier Regnier wrote:
I have a problem with my perl script with the command sed. Here is a
example of my code:
# Selecting the fast server
print Using the server called $server;
system(`/usr/bin/sed 's|\*default host=\(.*\)|\*default
Olivier Regnier wrote:
Hello,
I have a problem with my perl script with the command sed. Here is a
example of my code:
# Selecting the fast server
print Using the server called $server;
system(`/usr/bin/sed 's|\*default host=\(.*\)|\*default
host=${server}|' $standard_supfile
11 matches
Mail list logo