Re: I need to make this not end

2003-06-14 Thread Mark G
>all right, the only problem with the script you sent is that if it is = then the >number is always 10, its you asign "le" or < then it is >always 0. >here is what you sent. At least it works though.. I will keep working with it, and >thank you Not sure what exactly you mean by that. If you me

Re: I need to make this not end

2003-06-14 Thread Mark G
> I'm trying to make that ^^^ not end if you guess the number wrong. The chapter im reading is using the "for" and "while" >loop, but i guess I dont know enough yet to do this. Can someone help? you would need some type of a look to itterate through your code, that is why you book uses "for" a

while (<>)

2003-06-14 Thread Bryan Harris
Is there a way to discover the filename of the current file being read when using the angle brackets (e.g. while (<>) {} )? TIA. - Bryan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Need help with IPC::Open2

2003-06-14 Thread Rama Buddhineni
Hi, I need help regarding this script. This subroutine is supposeded to login into a database table ($TABLE) with query ($QUERY) and return the output. This is only a part of the total subroutine. sub getEvents { my ($TABLE,$QUERY) = @_; my ($a, @T, $T, @keys, @fmt, @K, $k, $j, %event, @L

Re: Something screwy with split

2003-06-14 Thread Harry Putnam
"Rob Dixon" <[EMAIL PROTECTED]> writes: > open PWD, '/etc/passwd' or die $!; > > next line, anybody? while (){ hehe -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Newbie question about the "int" operator

2003-06-14 Thread Rob Dixon
Mr.T Mr.X wrote: > Well, first of all, I am replying to this address, because everytime I try to send > an email to the "group" i get it returned. > Where am I supposed to send my questions? Well, in case its here, heres my Q: > > I am trying to work my way through the "Teach yourself PERL in

I need to make this not end

2003-06-14 Thread Mr.T Mr.X
#!/user/bin/perl -w $im_thinking_of=int(rand 10); print "Pick a number:"; $guess=; chomp $guess; if ($guess>$im_thinking_of) { print "You guessed too high!\n"; } elsif ($guess < $im_thinking_of) { print "You guessed too low!\

Re: Find regex in Start/Stop segments

2003-06-14 Thread Harry Putnam
Tassilo von Parseval <[EMAIL PROTECTED]> writes: >> That's good. and that is why chomp is an excellent choice for this >> context. Because the OP may not know, or be sure of, that fact. >> The chomp function is custom-designed for cases of uncertainty,.and >> is perfectly safe in cases where the

Re: Help required.....about string/text manipulation

2003-06-14 Thread Chinku Simon
Hi, I wud like some help in assembling the kit. Thanks in Advance --- Rob Dixon <[EMAIL PROTECTED]> wrote: > Mohit_jain01 wrote: > > > > > From: Rob Dixon > > > > > > Mohit_jain01 wrote: > > > > > > > > I am facing a problem with text file manipulation with Perl. > > > > > > > > I have a file wi

Re: vs while()

2003-06-14 Thread Steve Grazzini
Rob Dixon <[EMAIL PROTECTED]> writes: > > This is a special case of the 'while' loop. It is > equivalent to > > while (defined($_ = )) { > : > } > > But there is nowhere else that I can think of that > there is a default destination (left-hand side) of an > expression. There is at least th

JTable to ASCII table

2003-06-14 Thread Carol Nguyen
Hello, I'm looking for a free code that would take a JTable and convert it to ASCII table. If the code is in java, it would be great. Otherwise, I can learn to modify perl code then. Thanks in advance, Carol __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 p

Re: Help required.....about string/text manipulation

2003-06-14 Thread Rob Dixon
Mohit_jain01 wrote: > > > From: Rob Dixon > > > > Mohit_jain01 wrote: > > > > > > I am facing a problem with text file manipulation with Perl. > > > > > > I have a file with over 2 lac lines of data. > > > I need to find the duplicates(strings) in the file and copy those records into > > > another

Re: vs while()

2003-06-14 Thread Bryan Harris
> Your best bet for other cases is to browse through > > perldoc perlfunc > > looking for 'omitted' which will find all instances of default parameters > in there. Thanks, Rob, that was kind-of fun. - Bryan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

Re: perl process management

2003-06-14 Thread Wiggins d'Anconia
Lance wrote: Hi, I am writing a Perl script ( on a Pentium1 RedHat box ) to monitor some websites on some webservers. There are about 20 servers with 5 sites each. I have been playing with running various parts of the script in parallel, to try to get a perfomance boost, but am at a quandry. If

Re: Something screwy with split

2003-06-14 Thread Rob Dixon
Royce Wells wrote: > I am trying to split off the user name and the password record in one pass > through however what I am getting is only the first record is being > populated into my user array. > > Can someone tell me am I going about this the right way? > > Thanks, > Royce > > > > my @user=(sp

RE: compare, checking and listing

2003-06-14 Thread Gupta, Sharad
Because u are using strict u need to declare all of ur variables with "my". I can't see such a declaration for "@sre" in ur example. If u can tell something abt the error that would be very helpful. May be it's too early for me but i have a hard time figuring out what u are trying to do with eve

Re: Segfault in MIME::Fast

2003-06-14 Thread Wiggins d'Anconia
Ramprasad wrote: Hello all, I was running a small test script with MIME::Fast and it simply segfaults. Can anyone tell me why ## BEGIN SCRIPT ### #!/usr/bin/perl use MIME::Fast; my $str = new MIME::Fast::Stream(\*DATA); use strict; use warnings; You do n

Mail::Send or Mail::Sendmail question

2003-06-14 Thread Motherofperls
My script uses Sendmail. And I was just wondering about the question that is in todays topics, How to pack the mail module with your project. Do all servers with perl 5 and above come with Mail::Sendmail? Should I put Mail::Send in my programs library of odds n ends and use it instead?

Re: ABOR message using Net::FTP

2003-06-14 Thread Wiggins d'Anconia
Aman Thind wrote: Hi Wiggins The appearance of ABOR is extremely random. I've successfully uploaded huge files with this script without any issues. So this is possibly being generated by the server I'm uploading my files to...but WHY ? I still think it is being generated at the client end, see b

Re: Adding user to the system by using Perl?

2003-06-14 Thread zentara
On Sat, 14 Jun 2003 01:27:42 -0300, [EMAIL PROTECTED] (Josimar Nunes De Oliveira) wrote: >I get an error at line: >system("/usr/sbin/chpasswd $user:$password")==0 or die "Error: $?"; >and I changed it to: >system("echo $user:$password | /usr/sbin/chpasswd")==0 or die "Error: >$?"; >in such

Re: Wanting to send email but have some bold or underlined text in message

2003-06-14 Thread Wiggins d'Anconia
David Storrs wrote: On Fri, Jun 13, 2003 at 04:24:16PM -0700, Wagner, David --- Senior Programmer Analyst --- WGO wrote: So used to just sending data and I was wondering if one can send bold or underlined text, etc from straight email message or does it have to be in an attachment? Using w2k on

Re: Rational Clearcase perl and Mail::Send

2003-06-14 Thread Wiggins d'Anconia
David Storrs wrote: At work, we have a dated copy of Rational Clearcase that shipped with Perl 5.001 (!). The distribution comes with a module, Mail::Send. Our data manager is trying to write a script that will parse the logs after the nightly build and mail the results to several addresses (one o

RE: help needed on text file/String manipulation

2003-06-14 Thread Charles K. Clarkson
Chinku Simon <[EMAIL PROTECTED]> wrote: : : I am facing a problem with text file manipulation : with Perl. : : I have a file with over 2 lac lines of data. Strange. It looks like you've posted a similar message yesterday, except that file had a lot more blank lines. Have you made no progre

Re: Rational Clearcase perl and Mail::Send

2003-06-14 Thread James Edward Gray II
Separating multiple addresses by a , doesn't do the trick? (Just a guess, I've never used Mail::Send.) James On Saturday, June 14, 2003, at 01:18 AM, David Storrs wrote: At work, we have a dated copy of Rational Clearcase that shipped with Perl 5.001 (!). The distribution comes with a module

help needed on text file/String manipulation

2003-06-14 Thread Chinku Simon
Hi, I am facing a problem with text file manipulation with Perl. I have a file with over 2 lac lines of data. I need to find the duplicates(strings) in the file and copy those records into another file. Is there a function/module in Perl by which I can read the duplicates in a file at one

Re: beginner "if statement" question

2003-06-14 Thread James Edward Gray II
On Saturday, June 14, 2003, at 10:01 AM, deborah wrote: In the same line as my last question once I tried to understand how Perl was interpreting string comparisons, I started experimenting with different strings. What is Perl doing here? Why doesn't it use the "if" statement as a conditi

Re: beginner "if statement" question

2003-06-14 Thread John W. Krahn
Deborah wrote: > > In the same line as my last question once I tried to understand how > Perl was interpreting string comparisons, I started experimenting with > different strings. > > What is Perl doing here? Why doesn't it use the "if" statement as a > condition? It reassigns the variable v

beginner "if statement" question

2003-06-14 Thread deborah
In the same line as my last question once I tried to understand how Perl was interpreting string comparisons, I started experimenting with different strings. What is Perl doing here? Why doesn't it use the "if" statement as a condition? It reassigns the variable value instead of using it as

Re: Strings and operators?

2003-06-14 Thread Tassilo von Parseval
On Sat, Jun 14, 2003 at 08:56:21AM -0500 deborah wrote: > How does Perl interpret a string when used in a numeric comparison > equation? It depends. > I accidently used a numeric comparison operator when I was comparing > strings and I found that no matter what strings I compared, Perl always

Re: Strings and operators?

2003-06-14 Thread John W. Krahn
Deborah wrote: > > How does Perl interpret a string when used in a numeric comparison > equation? > I accidently used a numeric comparison operator when I was comparing > strings and I found that no matter what strings I compared, Perl always > said they were equal. > > Any other operation (suc

Strings and operators?

2003-06-14 Thread deborah
How does Perl interpret a string when used in a numeric comparison equation? I accidently used a numeric comparison operator when I was comparing strings and I found that no matter what strings I compared, Perl always said they were equal. Any other operation (such as <, >, != ) always proved

Re: vs while()

2003-06-14 Thread Rob Dixon
Bryan Harris wrote: > Thanks, Rob. > > Is there anywhere I can find other special cases? I was so happy when I > learned about split ' '. =) Not only that, but the default first parameter of 'split' is a single space, so you can do while () { my @record = split; } and it will split eac

Re: compare, checking and listing

2003-06-14 Thread Sudarshan Raghavan
Boon Chong Ang wrote: Hi, I have two array, @test1, @test2. Just say, I want compare @test2 with @test1 in such manner. @test2 could contains more, less or equal elements compare to @test1 which I don't know. I want to write a perl script to compare @test2 to @test1 and list out those element wi

Rational Clearcase perl and Mail::Send

2003-06-14 Thread David Storrs
At work, we have a dated copy of Rational Clearcase that shipped with Perl 5.001 (!). The distribution comes with a module, Mail::Send. Our data manager is trying to write a script that will parse the logs after the nightly build and mail the results to several addresses (one or more of which may

Re: Wanting to send email but have some bold or underlined text in message

2003-06-14 Thread David Storrs
On Fri, Jun 13, 2003 at 04:24:16PM -0700, Wagner, David --- Senior Programmer Analyst --- WGO wrote: > So used to just sending data and I was wondering if one can send bold or > underlined text, etc from straight email message or does it have to be in an > attachment? > > Using w2k

RE: compare, checking and listing

2003-06-14 Thread Boon Chong Ang
Hi, This is the script that I wrote using the Gupta approached. However, I received error when I run it. The goal is to get three output file. One is contains all the pin matched from array 1 to array 2, the second one is the elements from array 1 that don't match any elements from array 2 and th