RE: Perl on Cygwin

2004-12-12 Thread Mandar Rahurkar
Thank you very much for all your replies. Mandar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: traversing (and accessing values in) a hash of hashes

2004-12-12 Thread James marks
Lawrence (and all), I haven't gotten a chance to dig into the examples and work on the problem yet but I wanted to say thanks for the help. For example: Is using the IP address as the key really a good idea? Might an IP address be assigned to two different users -- or might a person use two diffe

Finding missing syntax element

2004-12-12 Thread Harry Putnam
I'm working on a program with some 433 lines of perl code. Some where in the course of editing today I've run up on an error that I need some way to debug. the code includes use diagnostics; And the message I get when I try to run it: Missing right curly or square bracket at ./nms2.pl lin

Write to file and tty from same print call

2004-12-12 Thread Harry Putnam
Duplication alert: I hope this isn't a duplicate but I think something strange happened to my first try === Something I've wanted a few times was a way to write to two places at once or really I mean with one print call. Something like: print FILE1 FILE2 "something\n"; or print FILE TTY "some

Re: Finding missing syntax element

2004-12-12 Thread Lawrence Statton
> I'm working on a program with some 433 lines of perl code. > Some where in the course of editing today I've run up on an error that > I need some way to debug. > Well .. perhaps this is $DEITY's way of telling that having a single scope block that is 433 lines long is a bad idea. One of the un

Re: Write to file and tty from same print call

2004-12-12 Thread Scott Dial
Try: http://search.cpan.org/~kenshan/IO-Tee-0.64/Tee.pm -smd +++ Harry Putnam [12/12/04 14:02 -0600]: > Duplication alert: I hope this isn't a duplicate but I think something > strange happened to my first try > > === > Something I've wanted a few times was a way to write to two places at > once

Re: Finding missing syntax element

2004-12-12 Thread reader
Lawrence Statton <[EMAIL PROTECTED]> writes: > Well .. perhaps this is $DEITY's way of telling that having a single > scope block that is 433 lines long is a bad idea. Naa, I have longer scripts that don't have this problem. It should run unless there is an actual syntax error. -- To unsubscri

Re: Write to file and tty from same print call

2004-12-12 Thread reader
[EMAIL PROTECTED] writes: > Scott Dial <[EMAIL PROTECTED]> writes: > >> Try: >> http://search.cpan.org/~kenshan/IO-Tee-0.64/Tee.pm > >>> === >>> Something I've wanted a few times was a way to write to two places at >>> once or really I mean with one print call. >>> >>> Something like: >>> print

Re: Finding missing syntax element

2004-12-12 Thread reader
"Charles K. Clarkson" <[EMAIL PROTECTED]> writes: > Harry Putnam <> wrote: > > : I've found over time that one or another of my editors will > : spot a missmatched syntax element with its syntax coloring. > : > : Either Emacs in cperl mode or vim always helps find something > : like this. > : >

Re: Finding missing syntax element

2004-12-12 Thread Chris Devers
On Sun, 12 Dec 2004 [EMAIL PROTECTED] wrote: > Lawrence Statton <[EMAIL PROTECTED]> writes: > > > Well .. perhaps this is $DEITY's way of telling that having a single > > scope block that is 433 lines long is a bad idea. > > Naa, I have longer scripts that don't have this problem. It should run

Re: Finding missing syntax element

2004-12-12 Thread reader
Jonathan Paton <[EMAIL PROTECTED]> writes: >> The error output tells me that perl has found a difference in the >> number of closing and opening items. Can I get finer resolution >> somehow? > > Not sure, but you would think there was. > > A consistant coding style (including indenting) helps ma

Re: Write to file and tty from same print call

2004-12-12 Thread Tor Hildrum
On Sun, 12 Dec 2004 15:33:44 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Trying to see something of how it works: > > #!/usr/local/bin/perl -w > use IO::Tee; > my ($handle1, $handle2); > $handle1 = "./one" > $handle2 = "./two" > $tee = IO::Tee->new($handle1, $handle2); I have never use

Re: Run Shell Script Using Perl

2004-12-12 Thread roime puniran
Actually i think u are missunderstood of my question. I am very sorry if my question are quite blurr...I have a perl script that doing FTP..and it's success...But i just wanna know if i can run that shell script in perl... My FTP's shell script is like this HOST='***.***.***.***' USER='abcd' P

Re: Write to file and tty from same print call

2004-12-12 Thread reader
Tor Hildrum <[EMAIL PROTECTED]> writes: > I have never used this module before in my life, but are you sure > $handle1 and $handle2 aren't supposed to be refs to actual > File-Handles? Yeah, probably something like that but what else needs to be in there to make the example work? Running it just

Re: Write to file and tty from same print call

2004-12-12 Thread Tor Hildrum
On Sun, 12 Dec 2004 19:32:53 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Yeah, probably something like that but what else needs to be in there > to make the example work? Wild guess: #!/usr/bin/perl use IO::Tee; open($handle1, "file1") or die("No!"); open($handle2, "echo") or die("No2

Re: html to xml (RSS)

2004-12-12 Thread Chris Devers
On Fri, 10 Dec 2004, Lincoln wrote: > Anybody know of a script to generate an rss feed from a regular static html > document? Maybe one that would update the feed when the page is updated? Isn't the whole point of RSS to not be static? The usual approach would be more along the lines of using

Re: Write to file and tty from same print call

2004-12-12 Thread Harry Putnam
Tor Hildrum <[EMAIL PROTECTED]> writes: > #!/usr/bin/perl > use IO::Tee; > > open($handle1, "file1") or die("No!"); > open($handle2, "echo") or die("No2!"); > > $tee = IO::Tee->new($handle1, $handle2); > print $tee "Hello world!"; Well thats better than what I came up with but it dies here on the

Re: Write to file and tty from same print call

2004-12-12 Thread Harry Putnam
Harry Putnam <[EMAIL PROTECTED]> writes: > Note that the original example from perldoc IO::Tee > has no opens in it: > > use IO::Tee; > >$tee = IO::Tee->new($handle1, $handle2); >print $tee "foo", "bar"; >my $input = <$tee>; > > Haa, I dug it up o

Re: Write to file and tty from same print call

2004-12-12 Thread reader
Scott Dial <[EMAIL PROTECTED]> writes: > Try: > http://search.cpan.org/~kenshan/IO-Tee-0.64/Tee.pm >> === >> Something I've wanted a few times was a way to write to two places at >> once or really I mean with one print call. >> >> Something like: >> print FILE1 FILE2 "something\n"; >> or >>

RE: Finding missing syntax element

2004-12-12 Thread Charles K. Clarkson
Harry Putnam <> wrote: : I've found over time that one or another of my editors will : spot a missmatched syntax element with its syntax coloring. : : Either Emacs in cperl mode or vim always helps find something : like this. : : This time I can find no lapse in the coloring, and taking the : a

Re: Finding missing syntax element

2004-12-12 Thread Jonathan Paton
> The error output tells me that perl has found a difference in the > number of closing and opening items. Can I get finer resolution > somehow? Not sure, but you would think there was. A consistant coding style (including indenting) helps make most problems easy to spot. You could also diff a

Re: Finding missing syntax element

2004-12-12 Thread reader
Chris Devers <[EMAIL PROTECTED]> writes: > Just because a overlong scope doesn't make Perl explode doesn't mean > that it is something that most people can realistically get their head > around. Thanks. I'm not sure how we are getting derailed here... The question posted is asking if there is

Re: Finding missing syntax element

2004-12-12 Thread Chris Devers
On Sun, 12 Dec 2004 [EMAIL PROTECTED] wrote: > Chris Devers <[EMAIL PROTECTED]> writes: > > I'm not sure how we are getting derailed here... The question posted > is asking if there is a way to get a better idea what is wrong with > this script from perl itself. Yes. Start ripping out chunks a

Re: Write to file and tty from same print call

2004-12-12 Thread Harry Putnam
Harry Putnam <[EMAIL PROTECTED]> writes: > cat io.pl > #!/usr/local/bin/perl -w > > use IO::Tee; > > open($handle1, "file1") or die("No!"); > open($handle2, "echo") or die("No2!"); > > $tee = IO::Tee->new($handle1, $handle2); > > print $tee "Hello world!"; Note that the or