Perl Help: Array Manipulation

2003-12-24 Thread Duong Nguyen
Hello everyone, Sorry for the spam, I am new to Perl and am having a hard time manipulating arrays. Below is the sample code that I am working on: @array1[0..5] = 1; @total[0] = 0; for($i=0; $i<4; $i++) { if($i == 0) { @total[$i] = @array1[$i]; print @total[$i];

RE: Why would I learn PERL ??

2003-12-24 Thread mcdavis941
If you choose software engineering as a career you'll prolly learn like 25 languages.  Perl is just so damn handy -- it's easy to do things you'll frequently want to do -- that it's likely to be one of them.  If you're not a software engineer, then Perl is a good language for casual programmers

Re: Why would I learn PERL ??

2003-12-24 Thread James Edward Gray II
On Dec 24, 2003, at 11:08 PM, Tone wrote: Hello, I'm interested in programming languages and am somehow new to this field.I am moving from Windows to Linux and am interested in engaging in the programming world. What I would like to ask is: why would I be interested in learning Perl ? All pro

Re: Why would I learn PERL ??

2003-12-24 Thread R. Joseph Newton
Tone wrote: > Hello, I'm interested in programming languages and am somehow new to this field.I > am moving from Windows to Linux and am interested in engaging in the programming > world. What I would like to ask is: why would I be interested in learning Perl ?Give > me the main reasons why I

Re: Why would I learn PERL ??

2003-12-24 Thread drieux
On Dec 24, 2003, at 9:08 PM, Tone wrote: Hello, I'm interested in programming languages and am somehow new to this field.I am moving from Windows to Linux and am interested in engaging in the programming world. Run Away would be my first advice. What I would like to ask is: why would I be inter

Why would I learn PERL ??

2003-12-24 Thread Tone
Hello, I'm interested in programming languages and am somehow new to this field.I am moving from Windows to Linux and am interested in engaging in the programming world. What I would like to ask is: why would I be interested in learning Perl ?Give me the main reasons why I may be interested in

Re: How to send O/P to file?

2003-12-24 Thread drieux
On Dec 24, 2003, at 2:03 PM, R. Joseph Newton wrote: [..] use strict; use warnings; my @remote_cmd_list = ('print "Hello, world!\n";'); # my $foo_bar = Net::Foo::Bar->new(@net_connect_stuff); my $filename = 'debug_runs/debug_' . time . '.log'; { open DEBUG_LOG, ">$filename" or die "Couldn't o

Re: Rogue Nation?

2003-12-24 Thread drieux
On Dec 24, 2003, at 3:38 PM, Robert Steck wrote: [..] Ah, but my friend Drieux, you apparently did not have the unalloyed pleasure of growing up in Texas in the 1950's, a time when the Texas Legislature came within a whisker of passing a law stipulating that from now on PI would equal exactly 3.1

Re: get list of files in subdirectories?

2003-12-24 Thread drieux
On Dec 24, 2003, at 1:23 PM, R. Joseph Newton wrote: drieux wrote: cf: [..] CAVEAT: this is not a call for the return to 'town/gown' kvetching. the fact that I was victimized by latin, greek and hebrew in my formative years is not meant to ra

How to extract the full URL from a relative link using WWW:: Mecha nize

2003-12-24 Thread Rajesh Dorairajan
I am using WWW::Mechanize to create a configuration file from a website and my script needs to go through a web-page and copy a specific links into a configuration file. I am using $m->links method that returns the list of links from a page. However, I am not able to get the fully qualified URL suc

Re: How to send O/P to file?

2003-12-24 Thread R. Joseph Newton
drieux wrote: > On Dec 24, 2003, at 12:07 AM, Tushar Gokhale wrote: > > > I've opened a connection to remote machine through perl script and > > sending > > commands and can see the output on screen but I want to put that > > output in > > File along with the commands that were send. how do I do t

Re: the ref() function: what does it mean when ...

2003-12-24 Thread Randal L. Schwartz
> "Wiggins" == Wiggins D Anconia <[EMAIL PROTECTED]> writes: Wiggins> Out of curiousity, why/when *in Perl* would you take a reference to Wiggins> something that holds a reference? And, "how deep does the well go?" Wiggins> (how far will Perl take the above indirection?)... I suppose I could

Re: get list of files in subdirectories?

2003-12-24 Thread R. Joseph Newton
drieux wrote: > On Dec 23, 2003, at 11:52 AM, Johnson, Shaunn wrote: > [..] > > But how can I get a list of files in a subdirectory without > > having to specify all of the subdirectories as a variable? > > (I hope that made sense). > > > > It sounds like I'd have to do something like get a list o

Problems with LWP::UserAgent

2003-12-24 Thread Dan Anderson
I am trying to create a spider to grab my books off of Safari for a batch printing job so I don't need to go through each chapter myself and hit the Print button. So I used this script to try and log myself in to the safari site: # BEGIN CODE #! /usr/bin/perl use strict; use warning

Re: the ref() function: what does it mean when ...

2003-12-24 Thread drieux
On Dec 24, 2003, at 12:05 PM, Wiggins d Anconia wrote: [..] Out of curiousity, why/when *in Perl* would you take a reference to something that holds a reference? Good question, let me know if you find a gooder answer. But clearly the fact that it can detect that a given scalar is a reference to a r

Re: the ref() function: what does it mean when ...

2003-12-24 Thread Wiggins d Anconia
> > On Dec 24, 2003, at 11:24 AM, [EMAIL PROTECTED] wrote: > [..] > > However, I have not seen this documented; could someone please (1) > > confirm or refute this (2) clarify if necessary and (3) point me to > > the relevant documentation. (The perlfunc page for ref() just lists > > possibl

Re: the ref() function: what does it mean when ...

2003-12-24 Thread drieux
On Dec 24, 2003, at 11:24 AM, [EMAIL PROTECTED] wrote: [..] However, I have not seen this documented; could someone please (1) confirm or refute this (2) clarify if necessary and (3) point me to the relevant documentation.  (The perlfunc page for ref() just lists possible return values, and not

the ref() function: what does it mean when ...

2003-12-24 Thread mcdavis941
Hi list, This question has to do with the ref() built-in function and its return values.   I see that one possible return value is 'REF', which I am inferring to mean that the argument given to ref() is a reference to a scalar which is itself a reference.  However, I have not seen this documen

Re: get list of files in subdirectories?

2003-12-24 Thread drieux
On Dec 23, 2003, at 11:52 AM, Johnson, Shaunn wrote: [..] But how can I get a list of files in a subdirectory without having to specify all of the subdirectories as a variable? (I hope that made sense). It sounds like I'd have to do something like get a list of subdirectories first and then do a se

Re: How to send O/P to file?

2003-12-24 Thread drieux
On Dec 24, 2003, at 12:07 AM, Tushar Gokhale wrote: I've opened a connection to remote machine through perl script and sending commands and can see the output on screen but I want to put that output in File along with the commands that were send. how do I do that? The obvious first question is h

Re: Align Text

2003-12-24 Thread James Edward Gray II
On Dec 23, 2003, at 11:29 PM, Bill Jastram wrote: Yes, this helps tremendously. Actually, your suggestions helped me make, what for me is, a quantum leap in the use of Perl. Good news. Always happy to help. I am stuck, however, on the loop you suggested to output the processed @col arrays. I un

Re: Perl defined variables

2003-12-24 Thread William Martell
Hello. $/ = Input record seperator, the delimiter Perl expects between the reocrds it reads from files. "\n" is default. Example. Undefining the record seperator allows you to read in a multiline file all at once. undef $/; open HANDLE, "file.txt"; $text = ; print $text; $* = Multi line matc

How to send O/P to file?

2003-12-24 Thread Tushar Gokhale
I've opened a connection to remote machine through perl script and sending commands and can see the output on screen but I want to put that output in File along with the commands that were send. how do I do that? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Align Text

2003-12-24 Thread Bill Jastram
Yes, this helps tremendously. Actually, your suggestions helped me make, what for me is, a quantum leap in the use of Perl. I am stuck, however, on the loop you suggested to output the processed @col arrays. I understand how you loaded them. And that, apparently, they are ready to be output. Bu