RE: process output pipe autoflush

2000-12-06 Thread erskine, michael
Everybody, all of the issues being discussed here are fully explained in the attatched link. I repeat myself... You should read M-J. Dominus's excellent Perl Journal article, "Suffering from Buffering?". This will give you all the answers you need.

Re: string to float and int

2000-12-06 Thread $Bill Luebkert
"Rivera, Claudia" wrote: I am trying the following: Lets say the $formula="a+b" Now I am doing a substitution so that: $formula="$data_a[$i]+$data_b[$i]" But now I want to get the actual results of this as float and int's. for ($i=0; $i@$length_of_arrays; $i++){

Is there tool to format Perl Code?

2000-12-06 Thread Wilson, Brent
Is there tool to format Perl Code? I have some pretty complicated scripts that could do with some formatting -- and I don't want to have do it by hand. Brent ___ Perl-Win32-Users mailing list [EMAIL PROTECTED]

RE: File/Directory Permissions

2000-12-06 Thread Ron Hartikka
$old_umask = umask 000; # was 022 for example which would turn 0777 into 0755 $log_directory = "junky"; # you need the leading 0 in "0777" below to make the number hex unless (-d "$log_directory") { mkdir ("$log_directory", 0777) or die ("Cannot create log_directory. $log_directory.

Re: string to float and int

2000-12-06 Thread Sisyphus
Hi, Maybe I don't understand it, too. Isn't what you want achieved by deleting the double quotes ? So it reads: $formula = $data_a[$i] + $data_b[$i]; Cheers, Rob Visit our website at http://www.kalinabears.com.au - Original Message - From: $Bill Luebkert [EMAIL PROTECTED] To: Rivera,

RE: comparing numbers

2000-12-06 Thread Andrew Hamm
-Original Message- From: Martin, James S. [mailto:[EMAIL PROTECTED]] I have an array say: @numbers =qw(100 125 150 200 300 325); and have a string, say $value = 120; What I would like to do, is return the number from @numbers that is closest to $value.. In this case it would be 120.

RE: File/Directory Permissions

2000-12-06 Thread Ron Hartikka
# the rest of the story (tested) use Fcntl; # gets the constants like O_WRONLY $old_umask = umask 000; # was 022 for example which would turn 0777 into $log_directory = "junky"; unless (-d "$log_directory") { mkdir ("$log_directory", 0777) or die ("Cannot create log_directory.

How to use HTTP PUT?

2000-12-06 Thread Kulkarni, Tushar (GEL, MSX)
Hi, I am not familiar with HTTP requests, so I am getting confused about this. I want to put a file on web server using HTTP PUT request and PERL. So I am using LWP and HTTP modules. it's something like this. use HTTP::Request::Common; use LWP::UserAgent; $ua =

RE: Mailman results for Perl-Win32-Users

2000-12-06 Thread De, Partho (GEL, MSX)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 06, 2000 5:50 PM To: [EMAIL PROTECTED] Subject: Mailman results for Perl-Win32-Users This is an automated response. There were problems with the email commands you sent to Mailman via the

Re: evaluating regex

2000-12-06 Thread $Bill Luebkert
Doug Brewer wrote: Hello, I'm a bit new to Perl, so forgive me if this is a simple question. I want to perform a function on every regex find on a string. I have a file that is filled with lines consisting of three fields, as follows: "#sidelink "VisualName" "index.html"\n I want

@ARGV example

2000-12-06 Thread byron wise
I know @ARGV holds command line arguments. What I'm looking for is a simple example of how this array comes up in the "real world". I'm working on a UNIX box if that matters. many thanks, byron "When you sell a man a book, you don't sell him 12 ounces of paper and ink and glue - you sell him

how to read individual characters from a file?

2000-12-06 Thread Alex Lee
I'm reading in from a file where each line contains a precise amount of characters (say 100) How can I read the individual elements of each line? Reason for asking is that these fields in those lines are fixed, so the first 20 contain a value, followed by 2 white spaces, then another 20 and so

Re: comparing numbers

2000-12-06 Thread Michael D. Schleif
"Martin, James S." wrote: I have an array say: @numbers =qw(100 125 150 200 300 325); and have a string, say $value = 120; What I would like to do, is return the number from @numbers that is closest to $value.. In this case it would be 120. How do I do this? Assuming [a] by

Re: reading hash from file did not produce expected results

2000-12-06 Thread SCOTT_SISSON
You can also try using a regex $x = '8114,[EMAIL PROTECTED]'; $x =~ /(.*),(.*)/; print "\n \$1 = $1 , \$2 = $2"; produces $1 = 8114 , $2 = [EMAIL PROTECTED] # note comma is from print statement no regex parsing.