[16170] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3582 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 10 17:58:32 2000

Date: Mon, 10 Jul 2000 14:58:20 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <963266300-v9-i3582@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 10 Jul 2000     Volume: 9 Number: 3582

Today's topics:
        Need Help (please) <Brettm@AtlasNow.com>
    Re: Need Help (please) <uri@sysarch.com>
    Re: Need Help (please) <lauren_smith13@hotmail.com>
    Re: Need Help (please) <bcaligari@shipreg.com>
    Re: Need Help (please) (David H. Adler)
        Need help installing extensions ramagoon@my-deja.com
        Need help with forms! <emeier@lucent.com>
    Re: Need help with forms! <qvaff@hotmail.com>
        Need Help with scp <jshaieb@wcg.net>
    Re: Need Help with scp <care227@attglobal.net>
    Re: Need Help with scp <memmett@fraser.sfu.ca>
    Re: Need Help with scp <kjetilskotheim@iname.com>
        need regex to extract domain.name from host.domain.name <robert@chalmers.com.au>
    Re: need regex to extract domain.name from host.domain. <foo@bar.va>
    Re: need regex to extract domain.name from host.domain. <gus@black.hole-in-the.net>
    Re: need regex to extract domain.name from host.domain. <robert@chalmers.com.au>
    Re: need regex to extract domain.name from host.domain. (Keith Calvert Ivey)
        Nested Reference Monsters <rmsims@steel.ucs.indiana.edu>
    Re: Nested Reference Monsters (Malcolm Dew-Jones)
    Re: Net::FTP not on CPAN <elaine@chaos.wustl.edu>
    Re: Net::FTP not on CPAN <gerard@NOSPAMlanois.com>
    Re: Net::FTP not on CPAN (David Combs)
        Net::FTP <jonathan.townsendNOjoSPAM@telus.com.invalid>
    Re: Net::FTP (David Efflandt)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 7 Jul 2000 16:58:40 -0700
From: "Brett Martin" <Brettm@AtlasNow.com>
Subject: Need Help (please)
Message-Id: <smcrp0g5nu65@news.supernews.com>


Hello,

I was referred to you by another Perl guru that said I may want to try to
contact you to find a person for my search.

I have a wonderful opportunity with an established (yet still private) .com
company in a very nice part of Santa Monica.  The site is now receiving 7
million hits/day and is an information leader.  Besides being one of the
most fun places to work in LA, our client offers competitive salaries
($100k+ DOE), full benefits that start immediately, Pre IPO stock (having
gone through 4 rounds of funding and going public within a year), frequent
salary reviews, free catered lunches, free snack and soda machines, an
incredible (casual) office complex with swimming pool, three tennis courts,
sand volleyball court, basketball court, and a health club/gym plus more.

This immediate need is a lead position that works side by side with the Java
group.  Looking for someone with around 3+ years experience with a
combination of the following:  Perl, CGI, Mod_Perl, MySQL or mSQL, Oracle,
Solaris.  This company uses the latest technologies so any other
languages/tech. like Java, XML/XSL, etc. and are also a big plus.

Because this position is a lead role having their own group of
architects/developers/QA the scope of the position will vary depending on
the specific strengths of the candidate.  In short we are looking for a team
player.

Thank you very much for your time, and I appreciate anything you can do to
help in this search.  I will also personally pay a $1000 referral fee.  And,
if it is not too much to ask, I would really appreciate it if you could
forward this to any others you feel may know someone with a level of
interest or could of any help.

Sincerely,

Brett Martin
Sr. Account Manager/Technical Recruiter
Atlas Technologies
562/437-1141





------------------------------

Date: Sat, 08 Jul 2000 00:04:54 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Need Help (please)
Message-Id: <x7em55pjvd.fsf@home.sysarch.com>

>>>>> "BM" == Brett Martin <Brettm@AtlasNow.com> writes:


  BM> I was referred to you by another Perl guru that said I may want to try to
  BM> contact you to find a person for my search.

who be you? and what guru would give you such wrong advice? this is not
a jobs group but a group discussing the perl language.

check out the perl jobs list at http://www.pm.org/mailing_lists.shtml

it is set up for just what you want. 

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


------------------------------

Date: Fri, 7 Jul 2000 17:44:13 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: Need Help (please)
Message-Id: <8k5thq$a04$1@brokaw.wa.com>


Brett Martin <Brettm@AtlasNow.com> wrote in message
news:smcrp0g5nu65@news.supernews.com...
>
> I was referred to you by another Perl guru that said I may want to try to
> contact you to find a person for my search.

I'm afraid your 'guru' is not what he claims he is if he indeed said that.

Love the buzzwords, though.

>
> .com company
> information leader
>
> latest technologies
>
> looking for a team player.
>
> Thank you very much for your time, and I appreciate anything you can do to
> help in this search.  I will also personally pay a $1000 referral fee.

Now that's what I wanted to hear!

Go to www.pm.org and you can link to mailing lists teeming with Perl-enabled
folks happy to make the 100K salaries you are promising.  Send me an email
and I'll send you my mailing address, you can send the $1000 to me ASAP.

> Brett Martin
> Sr. Account Manager/Technical Recruiter
> Atlas Technologies
> 562/437-1141

Do the companies that you recruit for know that you do this?

DHA should be along shortly.

Lauren





------------------------------

Date: Sat, 8 Jul 2000 11:25:30 +0200
From: "Brendon Caligari" <bcaligari@shipreg.com>
Subject: Re: Need Help (please)
Message-Id: <8k6rev$a95$1@news.news-service.com>


"Brett Martin" <Brettm@AtlasNow.com> wrote in message
news:smcrp0g5nu65@news.supernews.com...
>
> Hello,
>
> I was referred to you by another Perl guru that said I may want to try to
> contact you to find a person for my search.
>
> I have a wonderful opportunity with an established (yet still private)
 .com

 .com 's are so passe.






------------------------------

Date: 9 Jul 2000 05:22:13 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Need Help (please)
Message-Id: <slrn8mg305.3o2.dha@panix6.panix.com>

On Fri, 7 Jul 2000 17:44:13 -0700, Lauren Smith
<lauren_smith13@hotmail.com> wrote:

>Brett Martin <Brettm@AtlasNow.com> wrote in message
>news:smcrp0g5nu65@news.supernews.com...
>>
>> I was referred to you by another Perl guru that said I may want to try to
>> contact you to find a person for my search.
>
>I'm afraid your 'guru' is not what he claims he is if he indeed said that.

Seconded.

>DHA should be along shortly.

You rang? :-)

You [Brett, not Lauren] have posted a job posting or a resume in a
technical group.

Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.

Had you read and understood the Usenet user manual posted frequently
to "news.announce.newusers", you might have already known this. :)

Please do not explain your posting by saying "but I saw other job
postings here".  Just because one person jumps off a bridge, doesn't
mean everyone does.  Those postings are also in error, and I've
probably already notified them as well.

If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.

There is a Perl Jobs Announce list that may be more helpful to you.  See
<http://www.pm.org/mailing_lists.shtml> for details.

Yours for a better usenet,

dha


-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Well of *course* Perl should not be taught to everyone.  It should only
be taught to people who want to like their computers. - Larry Wall







------------------------------

Date: Mon, 10 Jul 2000 15:07:09 GMT
From: ramagoon@my-deja.com
Subject: Need help installing extensions
Message-Id: <8kcoqg$o0g$1@nnrp1.deja.com>

I'm new to perl, and attempting to write scripts with ftp functionality
in Win32 environment.  In order to do this, my research tells me I need
to load a Win32 extension for FTP capability.

I downloaded a package called Win32::Internet by Aldo Calpini, and tried
the install.bat.  Here is the output:

Can't locate NT.ph in @INC (did you run h2ph?) (@INC contains:
c:/indigo/lib c:/indigo/site/lib .) at install.bat line 8.

I installed the Indigo Perl distribution.  I am not familiar with what
needs to be done at this point.  Could someone please give me insight on
this process?

-Rick




Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Fri, 07 Jul 2000 14:57:02 -0500
From: Elizabeth Meier <emeier@lucent.com>
Subject: Need help with forms!
Message-Id: <3966360D.9F4E404@lucent.com>

Hello, I am trying to create something of a nested form.  What I have now is an
html file which calls a perl file.  That perl file needs to read in the input
from the html and ask questions for security or printing purposes.  

Here is my code.  When I run it I set $output = "todir" and $dataflow = "with". 
So what I what it to do is set of the data fields and labels and then wait for
user input and then find out if the user is valid ($user = "beth" and $password
= "ciao").  

This is what it prints out instead:

You have chosen bound 1 to be printed to a directory with data flow diagrams.

Please enter your user name

(text field)

Please enter your user password

(text field)

good job!
("submit query" and "reset" buttons)


when I hit "submit" no matter what I type it it responds "oh well.."  (which it
should no hit because of the if/else statement!).

here's my code!

Thanks for your help!


#!/opt/x11r6/bin/perl
#cgi script with CGI.pm

use CGI param, header, p;

#use_named_parameters();

$query = CGI::new();
$query2 = CGI::new();
$output = param("output");
$dataflow = param("dataflow");
$bound = param("bound");

print header();

if (("$output"eq"todir")&&("$dataflow"eq"with")) {
        print p("You have chosen bound $bound to be printed to a directory with
data flow diagrams.");

        print $query->start_multipart_form();

        print p("Please enter your user name");
        print $query->textfield(-name=>'user');
        print p("Please enter your user password");
        print $query->password_field(-name=>'password');

        #$user = $query2->param("user");
        #$password = $query2->param("password");

        print $query->submit(-onClick=>nameCheck($query2));
        print $query->reset;
}
else {
print p("oh well..");
}
        sub nameCheck {

        if(($query2->param("user")eq"beth")&&
($query2->param("password")eq"ciao")) {
        print p("good job!");
        }
        else{
        print p("incorrect user name and password!");
        }
}
exit(0);


------------------------------

Date: 07 Jul 2000 18:12:32 -0400
From: qvaff <qvaff@hotmail.com>
Subject: Re: Need help with forms!
Message-Id: <kussntlbne7.fsf@buphy.bu.edu>

I don't have time to debug this, but I'll try to give
some tips if you don't mind.


Elizabeth Meier <emeier@lucent.com> writes:
> when I hit "submit" no matter what I type it it responds "oh well.."
> (which it should no hit because of the if/else statement!).

[snip]

> $query = CGI::new();
> $query2 = CGI::new();
> $output = param("output");
> $dataflow = param("dataflow");
> $bound = param("bound");
>
> print header();

I would generally try to avoid mixing things up like this.
Just make one $query object and use that throughout the
entire script.
Also, I try to be consistent and either do all calls in the
object-oriented way, or the "standard" way -- usually I
use the objects.

Then when you get that straightened out, test to see what
values are actually being passed to the 'output' and 'dataflow'
parameters. Just put in an extra

    print 'output: ', $query->param('output'), '<br>',
          'dataflow: ', $query->param('dataflow'), '<br>';

somewhere (after the $query->header() call!).


> if (("$output"eq"todir")&&("$dataflow"eq"with")) {

Because you're always going to the "else" clause,
that implies that either ("$output"eq"todir")
or ("$dataflow"eq"with") or both are false.

As another slight tip, though you might not like it,
I personally think that looks hideous. I would use
something like

    $output eq 'todir' && $dataflow eq 'with'

but whatever.
HTH. :)


------------------------------

Date: Wed, 05 Jul 2000 20:37:09 GMT
From: Johnny Shaieb <jshaieb@wcg.net>
Subject: Need Help with scp
Message-Id: <Pine.SOL.3.96.1000705152725.15200B-100000@mail>

I need help using secure copy in a perl script.  The below excerpt is from
a functioning ftp script.  I want to use scp instead of ftp.  As most of
you know, you can edit your .netrc file lets you auto-login to a host when
using ftp.  I do not think scp will let you do this.

I tried editing this script for the scp tool, but it prompts me to log in.
Do any of you have any suggestion, ideas, or samples?

Thank You,

Johnny Shaieb

##########################################################################
&RunIt( "WARNING","/usr/bin/ftp -v > $doneSpot/ftp.output.txt $host",
           "<<EOF\n" .
           "$pushCommand".
           "quit\n".
           "EOF\n" );


# Returns 0 if ok
sub RunIt
{
  local( $args )     = pop( @_ );
  local( $prog )     = pop( @_ );
  local( $logLevel ) = pop( @_ );
  
  $ret = system( $prog . " " . $args ) / 256;
  
  if( $ret != 0 )
    {
      &LogIt( $logLevel, "exec '$prog' failed($ret) $args" );
    }
  
  #
  # Return $ret
  #
  
  $ret;               
}

##########################################################################




------------------------------

Date: Wed, 05 Jul 2000 17:53:47 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Need Help with scp
Message-Id: <3963AE6B.48293CAA@attglobal.net>

	Johnny Shaieb wrote:
> 
> I need help using secure copy in a perl script.  The below excerpt is from
> a functioning ftp script.  I want to use scp instead of ftp.  As most of
> you know, you can edit your .netrc file lets you auto-login to a host when
> using ftp.  I do not think scp will let you do this.

This is not a Perl question, and you don't have a Perl problem. 

Check the documentation for SSH and you will see what you need to do.

(     -i identity_file
          Selects the file from which the identity (private  key)
          for   RSA   authentication   is   read.    Default   is
          .ssh/identity in the user's home  directory.   Identity
          files  may also be specified on a per-host basis in the
          configuration file.  It is possible to have multiple -i
          options  (and  multiple  identities specified in confi-
          guration files).
)


------------------------------

Date: 05 Jul 2000 16:59:50 -0700
From: Matthew Emmett <memmett@fraser.sfu.ca>
Subject: Re: Need Help with scp
Message-Id: <yvw9r998w2kp.fsf@fraser.sfu.ca>


You can setup ssh (and therefore scp) so that you don't have to supply
a password when logging into a certain host from a certain host.  Read
the "ssh-keygen" and "ssh" manpages for more info.  Basically, you
create a key (with no passphrase) on your local machine, and upload
the public key to the remote machine.  Then, when connecting from the
local machine, you can gain access to the remote machine without
supplying a password.

Matt

Johnny Shaieb <jshaieb@wcg.net> writes:

> I need help using secure copy in a perl script.  The below excerpt is from
> a functioning ftp script.  I want to use scp instead of ftp.  As most of
> you know, you can edit your .netrc file lets you auto-login to a host when
> using ftp.  I do not think scp will let you do this.
> 
> I tried editing this script for the scp tool, but it prompts me to log in.
> Do any of you have any suggestion, ideas, or samples?
> 
> Thank You,
> 
> Johnny Shaieb
> 
> ##########################################################################
> &RunIt( "WARNING","/usr/bin/ftp -v > $doneSpot/ftp.output.txt $host",
>            "<<EOF\n" .
>            "$pushCommand".
>            "quit\n".
>            "EOF\n" );
> 
> 
> # Returns 0 if ok
> sub RunIt
> {
>   local( $args )     = pop( @_ );
>   local( $prog )     = pop( @_ );
>   local( $logLevel ) = pop( @_ );
>   
>   $ret = system( $prog . " " . $args ) / 256;
>   
>   if( $ret != 0 )
>     {
>       &LogIt( $logLevel, "exec '$prog' failed($ret) $args" );
>     }
>   
>   #
>   # Return $ret
>   #
>   
>   $ret;               
> }
> 
> ##########################################################################


------------------------------

Date: Thu, 06 Jul 2000 19:33:56 +0200
From: Kjetil Skotheim <kjetilskotheim@iname.com>
To: Matthew Emmett <memmett@fraser.sfu.ca>
Subject: Re: Need Help with scp
Message-Id: <3964D114.571B13FF@iname.com>


 ...or one could use Expect if a password is needed. I've done this with
scp and perl.
                                
Matthew Emmett wrote:
> 
> You can setup ssh (and therefore scp) so that you don't have to supply
> a password when logging into a certain host from a certain host.  Read
> the "ssh-keygen" and "ssh" manpages for more info.  Basically, you
> create a key (with no passphrase) on your local machine, and upload
> the public key to the remote machine.  Then, when connecting from the
> local machine, you can gain access to the remote machine without
> supplying a password.
> 
> Matt
> 
> Johnny Shaieb <jshaieb@wcg.net> writes:
> 
> > I need help using secure copy in a perl script.  The below excerpt is from
> > a functioning ftp script.  I want to use scp instead of ftp.  As most of
> > you know, you can edit your .netrc file lets you auto-login to a host when
> > using ftp.  I do not think scp will let you do this.
> >
> > I tried editing this script for the scp tool, but it prompts me to log in.
> > Do any of you have any suggestion, ideas, or samples?
> >
> > Thank You,
> >
> > Johnny Shaieb

-- 
Kjetil Skotheim
kjetilskotheim@iname.com


------------------------------

Date: Fri, 7 Jul 2000 20:20:04 +1000
From: "Robert Chalmers" <robert@chalmers.com.au>
Subject: need regex to extract domain.name from host.domain.name
Message-Id: <S6i95.5$TE2.1478@nsw.nnrp.telstra.net>

I'm struggling to find the right expression to extract only the domain name
from a string that contains the host name as well.

In a file of records of host.domain.names, where som have host names, and
some don't!

like

ns1.domain.com
domain0.com
domain2.com
xxx.domain3.com


I need to grab only the

  xxxx.com part

Could some kind soul help please.

Thanks heaps
Robert




------------------------------

Date: Fri, 07 Jul 2000 12:26:16 +0200
From: Marco Natoni <foo@bar.va>
Subject: Re: need regex to extract domain.name from host.domain.name
Message-Id: <3965B048.DBBE316E@bar.va>

Robert,

Robert Chalmers wrote:
> I'm struggling to find the right expression to extract only the 
> domain name from a string that contains the host name as well. In 
> a file of records of host.domain.names, where som have host names, 
> and some don't! like
> ns1.domain.com
> domain0.com
> domain2.com
> xxx.domain3.com
> I need to grab only the
> xxxx.com part
> Could some kind soul help please.

  Since the host name is the first sequence of non-'.' characters, an
easy way is to use the split function:

	print ((split /\./,$fully_qualified_domain_name)[0])


	Best regards,
		Marco

> 
> Thanks heaps
> Robert


------------------------------

Date: Fri, 07 Jul 2000 10:29:30 GMT
From: Gus <gus@black.hole-in-the.net>
Subject: Re: need regex to extract domain.name from host.domain.name
Message-Id: <962965770.5309.0.nnrp-01.c29f015a@news.demon.co.uk>

Robert Chalmers <robert@chalmers.com.au> wrote:
> I'm struggling to find the right expression to extract only the domain name
> from a string that contains the host name as well.

> In a file of records of host.domain.names, where som have host names, and
> some don't!

> I need to grab only the

>   xxxx.com part

Group the match with ()'s and match the end of the line

 s%(.*)\.(.*)\.(.*)$%$2\.$3%;

$ perl -nle '$_ =~ s%(.*)\.(.*)\.(.*)$%$2\.$3%; print "Result: $_"'
a.b
Result: a.b
a.b.c
Result: b.c
a.b.c.d
Result: c.d
a.b.c.d.e
Result: d.e

Regards,
	_Gus

-- 
gus@black.hole-in-the.net
0x58E18C6D
82 AA 4D 7F D8 45 58 05  6D 1B 1A 72 1E DB 31 B5
http://black.hole-in-the.net/gus/


------------------------------

Date: Fri, 7 Jul 2000 20:43:04 +1000
From: "Robert Chalmers" <robert@chalmers.com.au>
Subject: Re: need regex to extract domain.name from host.domain.name
Message-Id: <qsi95.7$TE2.1604@nsw.nnrp.telstra.net>

That looks like my baby..

Thanks Gus.

thanks to all the others too.
much appreciated.
Bob

"Gus" <gus@black.hole-in-the.net> wrote in message
news:962965770.5309.0.nnrp-01.c29f015a@news.demon.co.uk...
> Robert Chalmers <robert@chalmers.com.au> wrote:
> > I'm struggling to find the right expression to extract only the domain
name
> > from a string that contains the host name as well.
>
> > In a file of records of host.domain.names, where som have host names,
and
> > some don't!
>
> > I need to grab only the
>
> >   xxxx.com part
>
> Group the match with ()'s and match the end of the line
>
>  s%(.*)\.(.*)\.(.*)$%$2\.$3%;
>
> $ perl -nle '$_ =~ s%(.*)\.(.*)\.(.*)$%$2\.$3%; print "Result: $_"'
> a.b
> Result: a.b
> a.b.c
> Result: b.c
> a.b.c.d
> Result: c.d
> a.b.c.d.e
> Result: d.e
>
> Regards,
> _Gus
>
> --
> gus@black.hole-in-the.net
> 0x58E18C6D
> 82 AA 4D 7F D8 45 58 05  6D 1B 1A 72 1E DB 31 B5
> http://black.hole-in-the.net/gus/




------------------------------

Date: Fri, 07 Jul 2000 12:41:39 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: need regex to extract domain.name from host.domain.name
Message-Id: <3966cd79.36224717@nntp.idsonline.com>

"Robert Chalmers" <robert@chalmers.com.au> wrote:

>ns1.domain.com
>domain0.com
>domain2.com
>xxx.domain3.com
>
>I need to grab only the
>
>  xxxx.com part

for (@hosts) {
    my($domain) = /([a-z0-9-]+\.(?:com|net|org|gov|edu|mil))$/i;
    # do something with $domain
}

Note the parentheses around $domain, which cause the regex to be
evaluated in a list context.  Note also that this will not work
for host names in country-code top-level domains (.uk, .fr, .jp,
etc.), because many of those TLDs have deeper hierarchies.  For
example, applying a similar regex to .uk host names would result
in assigning all commercial hosts to co.uk, regardless of their
company name, and assigning all academic hosts to ac.uk,
regardless of their university.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


------------------------------

Date: 5 Jul 2000 16:43:54 GMT
From: beer nuts <rmsims@steel.ucs.indiana.edu>
Subject: Nested Reference Monsters
Message-Id: <8jvoka$sa5$1@flotsam.uits.indiana.edu>

Hey all,
	Just a quick question to anyone who's willing to help.  I'm trying
to extract information from html files so that it breaks down a table of 5
rows, 7 blocks per row, and lists of undetermined length within each block
(one list per block).  my take on it is to create an array of five
references for the month (it's a calendar submission program), with each
of those five pointing to 7-element arrays.  each of the 7 references
point to anonymous arrays, with each element of the anonymous array
pointing to a string for a time entry.  i can then print the whole
structure to a file as thus:

			foreach $Week (@month){
				print "<tr>\n";

				foreach $Day ($Week){
					print "<td> \n";

					foreach $Item ($Day) {
						print "<li> $Item \n";
					}

					print "</td> \n";
				}
				print "</tr> \n";
			}


question is, when I go to extract that later to modify, i have trouble
using loop labels to advance the <> constructor to properly pull the
information back into a nested structure like i had before (yeah, I'm new
at this, but cut me some slack).  any takers?  thanks

-ryan


------------------------------

Date: 5 Jul 2000 10:24:32 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Nested Reference Monsters
Message-Id: <39636f50@news.victoria.tc.ca>

beer nuts (rmsims@steel.ucs.indiana.edu) wrote:
: Hey all,
: 	Just a quick question to anyone who's willing to help.  I'm trying
: to extract information from html files so that it breaks down a table of 5
: rows, 7 blocks per row, and lists of undetermined length within each block
: (one list per block).  my take on it is to create an array of five
: references for the month (it's a calendar submission program), with each
: of those five pointing to 7-element arrays.  each of the 7 references
: point to anonymous arrays, with each element of the anonymous array
: pointing to a string for a time entry.  i can then print the whole
: structure to a file as thus:

: 			foreach $Week (@month){
: 				print "<tr>\n";

: 				foreach $Day ($Week){
: 					print "<td> \n";

: 					foreach $Item ($Day) {
: 						print "<li> $Item \n";
: 					}

: 					print "</td> \n";
: 				}
: 				print "</tr> \n";
: 			}


: question is, when I go to extract that later to modify, i have trouble
: using loop labels to advance the <> constructor to properly pull the
: information back into a nested structure like i had before (yeah, I'm new
: at this, but cut me some slack).  any takers?  thanks

Do you have to extract the data from the html?

It would be easier to store the data as a perl data structure, modify the
perl data structure as required, and generate the html later (simply
replacing old html each time). 

Perl/require can be used to read the perl data structures.  Perl can
easily manipulate the data in memory.  The data can be stored in various
ways, perhaps the easiest is Data::Dumper.

So the "complete" program would be something like pseudo code...

	use Data::Dumper;
	require 'previous_data.pm';	# recreate previous data
	manipulate_the_data();
	open PREVIOUS_DATA , '>previous_data.pm' or die $!;
	print PREVIOUS_DATA Dumper(\@month);
	close F;
	generate_and_print_html();	# overwrite previous html


------------------------------

Date: Wed, 05 Jul 2000 01:08:16 GMT
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: Net::FTP not on CPAN
Message-Id: <39628A7E.FB09F2B8@chaos.wustl.edu>

Jonathan Stowe wrote:
> <snip a bunch of stuff about not liking search.cpan.org and the Net::FTP
> manpage>
> As is said regularly here, I am sure that patches would be most welcome.

Well, you know, you can't make something that will please everyone all
the time. Graham has put a lot of work into it already and I'm quite
sure that things can be improved though I doubt a blinking 'download
here' button is the sort of thing that will appeal. It's funny how
quickly people take a new feature and start placing their expectations
upon it and other peoples time. It is a work in progress and since there
has been almost 30GB transferred through it since January, I gather that
most people have been able to figure out the interface. 

e.


------------------------------

Date: Wed, 05 Jul 2000 09:45:17 -0700
From: Gerard Lanois <gerard@NOSPAMlanois.com>
Subject: Re: Net::FTP not on CPAN
Message-Id: <3963661D.6C9F43F5@NOSPAMlanois.com>



Elaine -HFB- Ashton wrote:
> 
> Jonathan Stowe wrote:
> > <snip a bunch of stuff about not liking search.cpan.org and the 
> > Net::FTP manpage>
> > As is said regularly here, I am sure that patches would be most 
> > welcome.

Jonathan,

The source code is not currently available to developers for 
downloading.  If in fact it is, kindly provide me with a link
where I can download it.

> 
> Well, you know, you can't make something that will please everyone all
> the time. Graham has put a lot of work into it already and I'm quite
> sure that things can be improved though I doubt a blinking 'download
> here' button is the sort of thing that will appeal. 

Let the record reflect that you are the first and only person in 
this thread to suggest "blinking" as an improvement.

My beef is that the one link you have to click on to get to a place
where you can download libnet is rendered in the same (nonstandard)
color as all the surrounding text.  You could make it easier to
find by at least using a different color; easier still if you used
the standard link colors.

> It's funny how
> quickly people take a new feature and start placing their 
> expectations upon it and other peoples time. 

Isn't it funny how people beat a newbie about the head and shoulders
about how "really easy" their user interface is, and then ask about
suggestions on how to improve it, and then complain when they
actually get a suggestion?

"Quickly?"  Hey, you *asked* for suggestions, remember?

In http://x62.deja.com/getdoc.xp?AN=640231396 you wrote:
> ...the highlighting should be giving people a really easy
> way to find their way, but if it isn't then what would you 
> suggest?

I just don't find the current so-called "highlighting" scheme to be, 
as you say, "_really_ easy".  (emphasis mine) 

So, I thought I would point out that you are using multiple
nonstandard link colors, and that the one link the OP needed
to click on to download what he was looking for was rendered
in the same color as all the surrounding text, effectively
hiding the link from him.

> It is a work in progress and since there
> has been almost 30GB transferred through it since January, I gather 
> that most people have been able to figure out the interface.

Lies, damn lies, and statistics.

You only know that there was 30GB of successful downloads.  You have
no way of knowing how many people were confused and just hit the
back button.  So I don't see how you can claim "most peope have
been able to figure out the interface".  By "most" do you mean
"more than 50%"?  How did you tabulate the number of people that
*weren't* able to figure out the interface?  How can you make a
claim about the number of people that were able to find what
they were looking for versus the number that weren't, when in
fact you have no way of knowing how many weren't?


> e.

By way of comparison, this CPAN search engine gives a presentation
more to my liking:

   http://theoryx5.uwinnipeg.ca/CPAN/cpan-search.html

Notice how it uses the standard hyperlink colors (but without the
gosh-darn underlining - grrrr).

I find "Contained in libnet-1.0703" to be a much better way of
indicating that the desired module is part of a bundle.  Maybe
you can do something like that.  "Contained in ..." - I like it.


-Gerard


------------------------------

Date: 6 Jul 2000 07:27:28 GMT
From: dkcombs@netcom.com (David Combs)
Subject: Re: Net::FTP not on CPAN
Message-Id: <8k1cd0$ads$1@slb3.atl.mindspring.net>

Lots of complaints about colors, I read.

Haven't tried it yet (me a REAL newbie (virgin) re cpan),
but what about via LYNX with NO colors at all?

I will try it, but haven't yet.  

David



------------------------------

Date: Wed, 05 Jul 2000 08:38:12 -0700
From: jtownsend <jonathan.townsendNOjoSPAM@telus.com.invalid>
Subject: Net::FTP
Message-Id: <164c000c.13e3e70c@usw-ex0106-044.remarq.com>

I'm trying to use the Net::FTP module and am having a problem. The login
and put work OK but the site command does not seem to be working. It
returns a two which I believe is good but the umask is not being set
when the file is put. Doing this manually through ftp works OK.
Any suggestions?


$ecpftp = Net::FTP->new("$host",Timeout=>60);
$ecpftp->login("$user","$password");

$ecpftp->type("bin");
$ret=$ecpftp->site("umask 777");            **returns 2
print "umask=$ret\n";

$ecpftp->put("$filename","\'$destfile\'");  **file put OK (wrong perms)




* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



------------------------------

Date: 6 Jul 2000 02:20:45 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Net::FTP
Message-Id: <slrn8m7r7o.isr.efflandt@efflandt.xnet.com>

On Wed, 05 Jul 2000, jtownsend
<jonathan.townsendNOjoSPAM@telus.com.invalid> wrote:
>I'm trying to use the Net::FTP module and am having a problem. The login
>and put work OK but the site command does not seem to be working. It
>returns a two which I believe is good but the umask is not being set
>when the file is put. Doing this manually through ftp works OK.
>Any suggestions?
>
>
>$ecpftp = Net::FTP->new("$host",Timeout=>60);
>$ecpftp->login("$user","$password");
>
>$ecpftp->type("bin");
>$ret=$ecpftp->site("umask 777");            **returns 2
>print "umask=$ret\n";
>
>$ecpftp->put("$filename","\'$destfile\'");  **file put OK (wrong perms)

Wouldn't a "umask 777" give you ZERO file permissions?  Maybe that is
ignored because it does not make any sense.  You would not have permission
to to anything with the file once it was uploaded.  Umask is the bits that
you DON'T want set.  Typically a umask 022 would give directories 755
permission and files 644 permission.  A site chmod after you upload may be
easier to understand.

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/



------------------------------

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 3582
**************************************


home help back first fref pref prev next nref lref last post