Re: Standard O/I problems

2001-07-31 Thread John Fox
_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

Re: search for string in a file

2001-07-30 Thread John Fox
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

Re: $1

2001-07-27 Thread John Fox
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

Re: Socket Help Newbie

2001-07-25 Thread John Fox
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 --

Re: Problem with scan fields using split

2001-07-25 Thread John Fox
($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 --

Re: Interactive command running

2001-07-25 Thread John Fox
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

Re: Date verification

2001-07-25 Thread John Fox
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

Re: Date problem

2001-07-25 Thread John Fox
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

Re: reading a text file

2001-07-24 Thread John Fox
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 ---

Re: basename ?

2001-07-24 Thread John Fox
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 <

Re: passing a value to Perl

2001-07-24 Thread 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

Re: CPAN modules

2001-07-24 Thread John Fox
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 &

Re: Can PERL do a DIRECT GET?

2001-07-24 Thread 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

Re: $ftp_home in Net::FTP

2001-07-24 Thread John Fox
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 --

Re: autoflush on network connection

2001-07-20 Thread John Fox
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 ---

Re: pathname won't be recognized in open-command

2001-06-19 Thread John Fox
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

Re: Telnet

2001-06-15 Thread John Fox
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

Re: uninitialized value in numeric error

2001-06-13 Thread John Fox
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

Re: converting standard input to an upper or lower case

2001-06-12 Thread John Fox
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

Re: problem with script

2001-06-05 Thread John Fox
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

Re: Fwd: 'use' question

2001-06-05 Thread John Fox
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 --

Re: Graphics module gor perl

2001-06-04 Thread John Fox
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

Re: a question about function syslog()

2001-06-04 Thread John Fox
) 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