_file 2>&1");
You could also get the same results by experimenting with
the backticks and open() methods, but neither is as appropriate
as system().
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
needs, you might want to make
# this second test more specific...)
if ( $string =~ m!^CustomLog! && $string =~ m!$old_domain! ) {
# If the above two conditions were met, we perform
# the substitution.
$string =~ s![\w-]+\.[\w]{3}!$new_domain!;
}
# ...that changes were
have to change '\w+' to
'\w'. And if you wanted 'a' rather than ' a ', you'd use the
expression '\s(\w)\s' (excluding single-quotes, of course) to
grab *only* the word character.
Does that help?
John
--
John Fox <[EMAIL P
te_perl/5.6.0/i686-linux /usr/lib/perl5/site_perl/5.6.0
>/usr/lib/perl5/site_perl .) line 2.
Try using 'Socket.pm' rather than 'socket.pm'. :)
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
--
($var1, $var2) {
$time = (split(/ +/, $var))[2]; # Note that we split on ' +'!
print "Time was $time\n";
}
---end sample code
That work for ya?
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
--
in, it may
not be!
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
-
"What is loved endures. And Babylon 5 ... Babylon 5 endures."
--Delenn, "Ri
print "$var: Failed formatting test\n"; # print error message.
} else {# Otherwise, we print
print "$var: Passed formatting test\n"; # success message
}
}
end sample code
Hope that does it for you!
J
tring concatenation operator to stick 'em all together.
$date_string = $mon . $mday . $year;
# Show off our brilliance.
print "Today's date in MMDD format: $date_string\n";
end demo code
Perhaps a bit more than you asked for, but there you go.
Hope it helped.
John
E CODE
And that's it. Hopefully not overwhelming, but it works,
and can serve as a basis for further questions. :)
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
---
th_parts[$#path_parts];
print "Basename is: $basename\n";
You could also get this by futzing around with File::Basename, if you were
of a mind to drag a couple hundred extra lines of code. :)
Hope that helps,
John
--
John Fox <
similar to the C++ method you mention; Perl stashes the
command line arguments in the @ARGV array. First argument is
$ARGV[0], second $ARGV[1], etcetera.
Hope that helps,
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoSt
onship to perl
whatsoever.
If your concern turns out to be that you want to be sure your perl
binary can find new modules, you need not worry, as new modules
are added to the proper location as part of their (post build)
installation process.
Does that help?
John
--
John Fox &
what you might be talking about, and that
doesn't promote good communication. ;)
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
-
"What is loved endures. An
directory to the root directory.
So, to answer your question directly, "$ftp_home" was used to
indicate the directory (on the FTP server) containing the file
"$filename" to be downloaded via the 'get' method.
Hope that helps,
John
--
catenation
$mensagem = "10-bytes-of-data" . "\n";
# You could also embed the newline
$mensagem = "10-bytes-of-data\n";
HTH,
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
---
uot;d:/skyva/jre/bin/java |";
You see?
Little mistakes like this are *soo* easy to make!
HTH,
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
-
"What is love
can disconnect with "~.". (Quotes added by jjf).
This is directly analogous to telnet's '^-]' escape character. SSH has other
'~' sequences as well.
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
quote
things only when absolutely necessary.
Short answer: remove the quotes from "0.5" and try it
again. :)
HTH,
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
-
"What is loved endures. And Babylon 5 ... Babylon 5 endures."
--Delenn, "Rising Stars", Babylon 5
the problem?".
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
-
"What is loved endures. And Babylon 5 ... Babylon 5 endures."
--Delenn, "Rising Stars", Babylon 5
sort of warning...and in this case,
it is a very welcome warning, basically saying "Hey,
you mistyped a variable name.".
So, your situation amounts to exactly what your error
message said -> "possible typo". You really don't have
a problem; Perl's just trying rea
cal/bin/perl
>
> use Getopt::Std;
>
> getopt("abc");
>
> print "$opt_a - $opt_b - $opt_c\n";
> ---
You've transposed "#" and "!" in line 1.
HTH,
John
--
John
--
John Fox <[EMAIL PROTECTED]>
System Administrator, InfoStructure, Ashland OR USA
-
"What is loved endures. And Babylon 5 ... Babylon 5 endures."
--Delenn, "Rising Stars", Babylon 5
)
your syslog configuration directs them to.
To make good use of syslog, you need to have a basic
understanding of facilities and priorities. You
should read the following:
syslogd(8) - Type "man 8 syslogd"
syslog.conf(5) - Ty
23 matches
Mail list logo