[7518] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1144 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 8 11:07:08 1997

Date: Wed, 8 Oct 97 08:00:30 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 8 Oct 1997     Volume: 8 Number: 1144

Today's topics:
     Re: "19971008" and (....)(..) (felix k sheng)
     Re: "19971008" and (....)(..) (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
     Re: "19971008" and (....)(..) (I R A Aggie)
     [NEEDED] POST CGI - echo post data to a known file (Tobias Batch)
     Re: [Q - newbie] Sockets and bi-directional communicati <seay@absyss.fr>
     Re: Can't connect to socket in Perl for Win32 (Jared Evans)
     Re: Can't connect to socket in Perl for Win32 (Jeremy D. Zawodny)
     Re: Counting Lines Now Working <cstewart@flash.net>
     Re: Counting Lines <cstewart@flash.net>
     formatting text <erac.eramsva@memo.ericsson.se>
     Re: Help: Interfaces <ghowland@hotlava.com>
     How to do primary/secondary sort <kraybill@vianet.net.au>
     Re: How to do primary/secondary sort (Andrew M. Langmead)
     Re: I NEED AN EXPERT ON CGIpm; PROBLEM STATED HEREIN (Jim Esten)
     Re: Lost output ? (Jeremy D. Zawodny)
     Re: Memory usage of 30Meg scalars? (Jeremy D. Zawodny)
     Re: Net:FTP Binary file transfer question. (Jeffrey R. Drumm)
     Re: Q:perl beautifier? (Will Morse)
     THANKS: "19971008" and (....)(..) Koos_Pol@nl.compuware.com
     Re: Time Between two business dates (Jared Evans)
     Re: Trying to install modules FCGI <ertyert@ua.com>
     UNC Chapel Hill NC Perl Prgrmer Needed <mao@djembe.oit.unc.edu>
     Using variable names from a flat file <dhayden@netcomuk.co.uk>
     Re: Using variable names from a flat file (Jeremy D. Zawodny)
     Re: Wanted: Wall/Schwartz book (1st ed) (Tom Grydeland)
     Where to get WIN95 Perl??? <norbmckenna@sprynet.com>
     Re: Where to get WIN95 Perl??? (Jeremy D. Zawodny)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 8 Oct 1997 13:42:57 GMT
From: felix@chance.em.nytimes.com (felix k sheng)
Subject: Re: "19971008" and (....)(..)
Message-Id: <slrn63n3ca.b7e.felix@chance.em.nytimes.com>

On 8 Oct 1997 08:17:56 GMT, Koos_Pol@nl.compuware.com 
<Koos_Pol@nl.compuware.com> wrote:

>($year,$month) = ("19971008" =~ (....)(..))
>
>Why doesn't this return $year and $month? Instead, it returns the empty
>string. But I have a match on the first two, don't I?

you forgot the match operator. this will work:

($year,$month) = "19971008" =~ /(....)(..)/;

all things considered, if that's precisely the use you want from
this you might be more robustly served by:

($year,$month) = "19971008" =~ /(\d{4})(\d{2})/;

and *possibly* more speedily served by:

$year  = substr( "19971008", 0, 4 );
$month = substr( "19971008", 4, 2 );


oh well.

'lx

--- felix sheng                                       pager     800 979 2171
 programmer                                           tel       212 597 8069
 the new york times electronic media company          e    felix@nytimes.com


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

Date: Wed, 08 Oct 97 10:13:50 -0400
From: bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Subject: Re: "19971008" and (....)(..)
Message-Id: <343b9671$1$ofn$mr2ice@speaker>

In <wvpsouc4pje.fsf@hobbes.dmi.min.dk>, on 10/08/97 at 10,
   ckc@dmi.min.dk (Casper K. Clausen) said:
+-----
| "19971008" =~ /(....)(..)/
| However, your matches are assigned to $1 and
| $2, not returned as values. What you want is probably something along the
+--->8

Not true; in list context, which is how it was being used, m// returns a list
of matched substrings.  I would anchor the pattern, though, if only to avoid
confusion on part of the maintainer in the future.

    [C:\]perl
    ($year, $month) = ("19971008" =~ /(....)(..)/);
    print $year, " ", $month, "\n";
    ^Z
    1997 10

-- 
brandon s. allbery              [Team OS/2][Linux]          bsa@void.apk.net
cleveland, ohio              mr/2 ice's "rfc guru" :-)                 KF8NH
Warpstock '97:  OS/2 for the rest of us!  http://www.warpstock.org
Memo to MLS:  End The Burn Scam --- Doug Logan MUST GO!  FORZA CREW!



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

Date: Wed, 08 Oct 1997 10:31:31 -0400
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: "19971008" and (....)(..)
Message-Id: <-0810971031310001@aggie.coaps.fsu.edu>

In article <slrn63n3ca.b7e.felix@chance.em.nytimes.com>, felix@nytimes.com
wrote:

+ all things considered, if that's precisely the use you want from
+ this you might be more robustly served by:

+ ($year,$month) = "19971008" =~ /(\d{4})(\d{2})/;
 
+ and *possibly* more speedily served by:
 
+ $year  = substr( "19971008", 0, 4 );
+ $month = substr( "19971008", 4, 2 );

Or even:

($yr,$mon)=unpack('A4A2',"19971008");

James

-- 
Consulting Minister for Consultants, DNRC
Support the anti-Spam amendment <url:http://www.cauce.org/>
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>


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

Date: Wed, 08 Oct 1997 14:49:45 GMT
From: toby@io.com (Tobias Batch)
Subject: [NEEDED] POST CGI - echo post data to a known file
Message-Id: <343d9ca1.10945809@reading.news.pipex.net>

I would like to politely request if anyone out there has a perl CGI
which will echo a stream of bytes (written to the std in) to a file
name of $REMOTE_ADDR.

I need this to handle a large POST CGI.

The purpose of this is to allow a java applet to write out a large
file on the server.

If anyone can help I'd be very grateful.



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

Date: Wed, 08 Oct 1997 12:14:16 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: [Q - newbie] Sockets and bi-directional communication
Message-Id: <343B5CF8.70D22B7E@absyss.fr>

J. Gregory Wright wrote:

[flame deleted.  the topic had been about sysread/syswrite and select]

> At any rate, you *can* use 'print' and '<SOCK>' to do bi-directional
> I/O over a single socket connection, if you use the following code:

IIRC The problem comes from select() and buffered input.  You can use
buffered output (ie print) all you want (although you might want to turn
autoflush on), the problem is with read.  You need an unbuffered read
(ie sysread) becuase select doesn't look at the buffers.  select could
say that there was no data, but there was interesting stuff in the
buffers.  (someone please correct me if I misremembered something)

>   my $oldfh = select(SOCK);
>   $| = 1;
>   select($oldfh);
> 
> which turns on auto-flush for output operations on the pipe.  It makes
> data available to the other side as soon as the output record separator
> character is encountered in the output stream.  This was derived from
> the responses to the article titled "fflush".

That is the non-OO way of doing it and has been the standard since at
least Perl4.  If you are using File::Handle, or IO::File (something
OO-ish), there is $filehandle->autoflush(1) for doing the same sort of
thing.

> Is this the most optimal way to go about doing this?  Probably not...

I prefer OO stuff, but it works and even "the standard way".

> but I would need some input on the second part of my question, which
> had to do with the use of the IO::Socket library:
> 
> >Now one thing I have noticed from digging around in the newsgroup is
> >that most folks seem to be using the IO::Socket library, instead of the
> >"use Sockets".  Did I miss something?
> 
> Is this a better way to do things?  And when did it show up (as in, which
> version of Perl).

I don't know if it is "better", but it sure is easier.  I think it is up
there with sliced toast.  I know it is with 5.004, I think it showed up
during 5.003.  If you don't have it on your system, just upgrade because
anything older than 5.004 has security holes.  If that isn't
possible/easy, then look around at CPAN.

- doug


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

Date: 8 Oct 1997 12:43:42 GMT
From: jared@node6.frontiernet.net (Jared Evans)
Subject: Re: Can't connect to socket in Perl for Win32
Message-Id: <61fv5u$1qdk$1@node6.frontiernet.net>

Activeware/Activestate port of perl will be dead-  You can do the WWW stuff
you want with the standard perl distribution for Win32.  I tried it and it
works like a charm-  There even a primitive web browser in TK/Perl (included
in the distribution) and it works beautifully under NT.

-- 
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg 
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084d2ac158c84c4ece4d22d1000118a8d5491000000
EOF


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

Date: Wed, 08 Oct 1997 14:42:30 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Can't connect to socket in Perl for Win32
Message-Id: <343f9baf.587195212@igate.hst.moc.com>

[cc'd automagically to original author]

On 8 Oct 1997 12:43:42 GMT, jared@node6.frontiernet.net (Jared Evans)
wrote:

>Activeware/Activestate port of perl will be dead

Explain that statement, please. Either that, or don't go around
proclaiming that a software distribution is going to die!

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Wed, 8 Oct 1997 09:33:04 -0500
From: "Chuck" <cstewart@flash.net>
Subject: Re: Counting Lines Now Working
Message-Id: <61g5i0$lq5$1@excalibur.flash.net>

Thanks to everyone, I stumbled into the fix.





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

Date: Wed, 8 Oct 1997 09:23:47 -0500
From: "Chuck" <cstewart@flash.net>
Subject: Re: Counting Lines
Message-Id: <61g50i$kqq$1@excalibur.flash.net>

This script is supposed to count the lines and add a T to those lines where
the $total is the same, else just count and print the lines.  Can someone
take a look and straighten me out.  Thanks...

open(DATABASE, "$showfile");
   @dlines = <DATABASE>;
   close(DATABASE);
   open(DATABASE, ">$showfile");
   $count++;
   my $count = 1;
   my $lag = 1;
   for (my $i=0; $i < @dlines; $i++) {
   my($total, $rest) = split /\t/,$dlines[$i],2;
   my $count = 1;
   my $lag = 1;
   if ($total == (split /\t/,$dlines[$i+1],2)[0]) {
   print DATABASE "T$count\t$total\t$rest";
   $lag++;
   } elsif ($lag > 1) {
   print DATABASE "T$count\t$total\t$rest";
   $count += $lag;
   $lag = 1;
   } else {
   print DATABASE "$count\t$total\t$rest";
   $count++;
   }
   }





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

Date: Wed, 08 Oct 1997 16:16:18 +0100
From: "Martin Svanstrvm" <erac.eramsva@memo.ericsson.se>
Subject: formatting text
Message-Id: <343BA3C2.8C8EF90D@memo.ericsson.se>

Can anyone tell me how to set the tabs (used with \t in "print")?
What I'm trying to do is simply to print a list of text variables on the
same line in a nice formated way.

All help greatly appreciated,
M. Svanstrvm





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

Date: Wed, 08 Oct 1997 12:38:47 +0100
From: Gary Howland <ghowland@hotlava.com>
To: Chan <hc@toraix1.torolab.ibm.com>
Subject: Re: Help: Interfaces
Message-Id: <343B70C7.68C3@hotlava.com>

Chan wrote:
> 
> What's the equivalent of an interface in Java?

Standard perl inheritance.  This is because Perl inheritance (done using
the @ISA array) does not allow for the inheritance of anything but
package (class) methods, much like java interfaces.

If you are looking for something like standard java inheritance (using
java 'extends'), where data members are inherited, you won't find it in
Perl.


Gary
-- 
pub  1024/C001D00D 1996/01/22  Gary Howland <gary@hotlava.com>
Key fingerprint =  0C FB 60 61 4D 3B 24 7D  1C 89 1D BE 1F EE 09 06


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

Date: Wed, 08 Oct 1997 20:03:34 +0800
From: Gene Kraybill <kraybill@vianet.net.au>
Subject: How to do primary/secondary sort
Message-Id: <343B7696.1A7F@vianet.net.au>

As a Perl "newbie", I'm customising a freeware script. I need help to
figure out how to sort a flat database file so that it is sorted on TWO
of the fields, one as a primary, the other as a secondary. The code
below sorts on just ONE field (time), which is the field I want to be
the secondary one.

Any help much appreciated...

Gene Kraybill
kraybill@vianet.net.au

-- code below --   

 &GetFileLock ("$lock_file");
   open (DATABASE, "$database_file") ||  &CgiDie ("I am sorry, but I was
        unable to open the calendar data file in the  Make The Addition
        routine. The value I have is $database_file.  Would you please
        check the path and permissions.");

    while (<DATABASE>)
      {
      @database_fields = split (/\|/, $_);

      if ($_ =~ /^COMMENT:/)
        {
        $comment_row .= $_;
        }

      else
        {
        $sortable_row = "$database_fields[$field_num_time]~~";
        $sortable_row .= $_;
        push (@database_rows, $sortable_row); 
        }
      }

    @sorted_temp_database = sort (@database_rows);

    foreach $database_row (@sorted_temp_database)
      {
      ($extra_event_time, $true_database_row) = split (/~~/,
$database_row);    
      push (@final_sorted_database, $true_database_row);
      }
    close (DATABASE);

    open (TEMPFILE, ">$temp_file") || &CgiDie ("I am sorry, but I was
        unable to open the temp file in the Make The Addition
        routine. The value I have is $temp_file.  Would you please
        check the path and permissions.");

    print TEMPFILE "$comment_row";

    foreach $row (@final_sorted_database)
      {
      print TEMPFILE "$row";
      }

    close (TEMPFILE);

    rename ($temp_file, $database_file);
    &ReleaseFileLock ("$lock_file");

-- end of code --


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

Date: Wed, 8 Oct 1997 14:00:41 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: How to do primary/secondary sort
Message-Id: <EHqK95.Hx5@world.std.com>

Gene Kraybill <kraybill@vianet.net.au> writes:

>As a Perl "newbie", I'm customising a freeware script. I need help to
>figure out how to sort a flat database file so that it is sorted on TWO
>of the fields, one as a primary, the other as a secondary. The code
>below sorts on just ONE field (time), which is the field I want to be
>the secondary one.

Take a look at sort in the perlfunc man page or the FAQ
<URL:http://www.perl.com/CPAN/doc/manual/html/pod/perlfaq4/
How_do_I_sort_an_aray_by_anyth.html> for more info about this stuff.

What you probably want to do is to split each record and store the
fields that you want to sort on as discrete elements. Then in a custom
sort comparison subroutine, refer to those computed elements.

while(defined($record = <>)) {
  @field = split /:/, $record;
  $primary{$record} = $field[0];
  $secondary{$record} = $field[1];
  push @record, $_;
}

for(sort by_fields @record) {
  print;
}

# takes to elements in the global vars $a and $b and determines their 
# sort order, based on the information we computed and saved in 
# %primary and %secondary. If the values in @primary{$a,$b} are unequal
# we return info to tell which is greater. If they are equal, we
# then check @secondary{$a,$b} and return the appropriate flag.
# If both computed fields are equal, then the value returned (based on 
# the comparison in %secondary) says that the two records should be 
# considered equal.
sub by_fields {
  $primary{$a} cmp $primary{$b} || $secondary{$a} cmp $secondary{$b};
}


Since we know ahead of time the number of fields to sort on, we don't
need the looping construct as shown in the articles from the other day
with the subject "Sorting values such as 1.1, 1.1.1, 2.1 into order"

-- 
Andrew Langmead


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

Date: 8 Oct 1997 09:30:26 -0500
From: jesten@earth.execpc.com (Jim Esten)
Subject: Re: I NEED AN EXPERT ON CGIpm; PROBLEM STATED HEREIN
Message-Id: <61g5e2$a68$1@earth.execpc.com>

Coyt Taylor Wilson (ctw@vt.edu) wrote:
: CGIpm is supposed to work on Linux because it was developed on Linux.
: Well, it's bombing out for no explicable reason.

: This is the error that shows up in my error_log:

: Can't find string terminator "END_OF_AUTOLOAD" anywhere before EOF at 
: /xpr/jxv/httprdex/cgi-bin/clank/cgipm/CGI.pm line 645.

Often the string terminator errors get caused by line feed
differences between dos and unix... have you checked to make
sure that is clean...?? Run it through a perl one liner stripping
\015 to be sure...

Jim



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

Date: Wed, 08 Oct 1997 14:40:07 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Lost output ?
Message-Id: <343e9b1b.587047069@igate.hst.moc.com>

[cc'd automagically to original author]

On Wed, 8 Oct 1997 09:51:24 +0200, "Soren M. Pedersen"
<sorenmp@iname.com> wrote:

>I try to run a perl script, as a CGI interface from at internet browser. The
>script calling a NT .exe file. The .EXE file display some output, and the
>perl script just formats commandline parameters for the exe file.
>
>My problem is to redirect the .exe's output to back to the browser .
>
>My Code:
>print "Content-Type: text/html\n\n";
>print "<HTML><BODY>Result is<HR>\n";
>...
>exec "NT_UTIL.EXE   -options name  data ";

Try using backticks (``) or system() instead of exec.

exec() replaces the currently running program (your script) with the
one you specified.

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Wed, 08 Oct 1997 14:38:24 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Memory usage of 30Meg scalars?
Message-Id: <343d9a55.586849284@igate.hst.moc.com>

[cc'd automagically to original author]

On Wed, 08 Oct 1997 09:13:38 +0100, Gary Howland
<ghowland@hotlava.com> wrote:

>I'm trying to use Perl for a backup system, and am reading the contents
>of files into scalars.  If the sizes of my files are anything up to 30
>megs, is it unreasonable to assume that this is the cause of my perl
>process growing to 121 megs?

No, it's not unreasonable to assume that--assuming that you believe
assumptions are reasonable, of course. :-)

>Is this perhaps due to perl having three or four copies of my 30 meg
>scalar?

Yeah, that definite sounds like a problem.

>And if this is normal behaviour, how can I improve the efficiency,
>perhaps by preventing these extra copies?  Would the use of references
>help?

Yes, use references when you need to move/copy big data items.

>Or is my only solution to not read the whole file into a scalar?

Sounds like the best idea so far. Why *are* you reading the entire
files into scalars? Are you doing anything more that what File::copy
can probably do for you?

>If so,
>are there any modules out there that will copy the contents of one file
>handle to another?

Oops. I just gave away the secret. :-)

Good Luck,

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: Wed, 08 Oct 1997 11:38:09 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: Net:FTP Binary file transfer question.
Message-Id: <343b6f64.492372113@news.mmc.org>

On Wed, 08 Oct 1997 02:28:38 -0500, mshavel@erols.com (Mike S) wrote:

>Hi
>
> I have gotten Net::FTP to work very well except for one thing. 
>I can't seem to transfer the files in binary mode. 
>I tried $ftp->type("binary") to no avail. 
>Anyone know how to do this?  Thanks very much for the advice. 
>
>Mike 
>
>mshavel@erols.com

Hmm. Syntax looks funny . . . I use:

$ftp->binary or die "couldn't set binary mode: $!\n";

-- 
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center - Medical Information Systems Group
420 Cumberland Ave, Portland, Maine 04101
Voice: 207-871-2150 Fax: 207-871-6501 Email: drummj@mail.mmc.org


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

Date: 8 Oct 1997 09:20:22 -0500
From: will@Starbase.NeoSoft.COM (Will Morse)
Subject: Re: Q:perl beautifier?
Message-Id: <61g4r6$84r$1@Starbase.NeoSoft.COM>


What could be more beautiful than perl?

In article <343A917A.3DE0@nortel.ca>,
Anton Fernando  <secdevc2@nortel.ca> wrote:
>hi folks,
>	Like cb (C beautifier), is there one for Perl5.* ?
>
>Thankx in Adv
>anton fernando
>secdevc2@nortel.ca


-- 
# Copyright 1997 Will Morse.  Internet repost/archive freely permitted.
# Hardcopy newspaper, magazine, etc. quoting requires permission.
# 
#      Gravity,                    #    Will Morse
#      not just a good idea,       #    Houston, Texas
#              it's the law.       #    will@starbase.neosoft.com
#
#   These are my views and do not necessarly reflect anyone else/
 =========================================================================
      By US Code Title 47, Sec.227(a)(2)(B), a computer/modem/printer
      meets the definition of a telephone fax machine. By Sec.227(b)
      (1)(C), it is unlawful to send any unsolicited advertisement to
      such equipment, punishable by action to recover actual monetary
      loss, or $500, whichever is greater, for EACH violation.
 =========================================================================



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

Date: 8 Oct 1997 14:30:02 GMT
From: Koos_Pol@nl.compuware.com
Subject: THANKS: "19971008" and (....)(..)
Message-Id: <61g5da$81v@news.nl.compuware.com>

Thank you all for your help. Just what I needed to get past this hickup.
Thanks again!

Koos Pol
--------------------------------------------------------------------------
S.C. Pol                                               tel: +31 20 3116122
PC Systems Administrator                  email: Koos_Pol@nl.compuware.com
Compuware Europe                     PGP public key available upon request

      A little inaccuracy sometimes saves tons of explanation.
                        -- H. H. Munroe





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

Date: 8 Oct 1997 12:47:38 GMT
From: jared@node6.frontiernet.net (Jared Evans)
Subject: Re: Time Between two business dates
Message-Id: <61fvda$tu6$1@node6.frontiernet.net>

There is a module that will do exactly this.  Look for it.

-Jared
-- 
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg 
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084d2ac158c84c4ece4d22d1000118a8d5491000000
EOF


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

Date: 8 Oct 1997 13:15:24 GMT
From: erty <ertyert@ua.com>
Subject: Re: Trying to install modules FCGI
Message-Id: <61g11c$be9@gringo.somi.sk>

:> In article <610t6c$no6@news.cuny.edu>, "kinlam" <kinlam@mec.cuny.edu> wrote:
:> 
:> >    I download a modules(FCGI-0.30) from CPAN. When I try to install it,  It
:> >give an error of "perl isn't compiled with perlio/sfio support.  I found out
:> >from the REAME file that come with FCGI module that I have to configure perl
:> >with the following option
:> > './Configure -Duseperlio -Dusesfio'.  So, I did, but I get the same error
:> >when try to install it (perl Makefile.PL).
:> 
:> did you recompile perl after you ran Configure?  did it pass all of the 
:> tests?  does `perl -V` show that you used the sfio library?
:> 
:> -- 
:> brian d foy                                  <comdog@computerdog.com>
:> NY.pm - New York Perl M((o u)ngers aniacs)*  <URL:http://ny.pm.org/>
:> CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


            ----------------------------------------------------
                       posted by WWWNews gateway v1.12
               (c) 1997 Somi Systems Ltd. http://www.somi.sk/
               somi.sk is NOT the originators of the articles 
                 and are NOT responsible for their content.


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

Date: Wed, 08 Oct 1997 10:05:04 -0400
From: Mary Overby <mao@djembe.oit.unc.edu>
Subject: UNC Chapel Hill NC Perl Prgrmer Needed
Message-Id: <343B9310.5F7C@djembe.oit.unc.edu>

The Instructional Technologies Development Group is recruiting
for an Application Programmer II to provide programming support
for instructional applications delivery over the Internet.
http://sunsite.unc.edu/mao/itd/ap2.html
 
Title: APPLICATIONS PROGRAMMER II
Location: University of North Carolina - Chapel Hill
Department: ATN - Development & Evaluation
Job Family: Executive, Administrative, Managerial and Professional
Position Number:   36378
Salary Grade:  73
Salary Range:  $36,642 - $54,041
Dept. Contact:  Diane Strong
Hiring Supervisor:  Mary Overby
Email: mary_overby@unc.edu
Location:  Davis Library
Schedule: 8:00 am - 5:00 pm
 
Minimum Education and Experience: Bachelor's degree with nine
semester hours in computer programming and one year of progressive
experience in computer programming; or Bachelor's degree in computer
science, information systems management, or a related curriculum;
Associate's degree in computer programming and one year of progressive
experience in computer programming. A degree directly related to the
technical nature of the application(s) assigned may be substituted for
up to six months of the experience requirement.
 
Preferred Qualifications:
Position is for computer programmer in support of instructional
applications delivery over the Internet. Responsibilities involve
evaluating, maintaining, enhancing and developing instructional
software. The ideal candidates will have experience in the development
of distributed applications using one or more of the following computer
languages: C/C++, Java, PERL in a UNIX environment.
 
Applicants must be highly motivated with the ability to adapt to
different technical environments and tools. Applicants must be able
to contribute in a team environment and possess excellent interpersonal
and communication skills.
 
If you are interested in this position, please apply to:
 
      Employment Department,
      Office of Human Resources,
      UNC Chapel Hill, Campus Box 1045,
      725 Airport Road, Chapel Hill, NC 27599-1045.
      http://www.adp.unc.edu/hr/
 
The University of North Carolina is an equal-opportunity employer.
 
The mission of the ATN Development and Evaluation Division
is to formalize the evaluation of strategic products and
technologies, to provide a focus for software integration and
development efforts across all ATN operating units, and to
maintain leadership in researching and implementing networked
information technologies in support of UNC's teaching and research
missions.
 
Within the ATN Development and Evaluation Division, the
Instructional Technologies Development Group's mission is to
work with the ATN Simple Start Program to coordinate and perform
software integration and/or development of new software systems
and applications that support instructional delivery via the
internet.

------------------------------------------------------------------------
 
        Mary A. Overby, Manager | Instructional Technologies
Applications Analyst Programmer | Development & Evaluation Division
    http://sunsite.unc.edu/mao/ | Academic Technology & Networking
            mary_overby@unc.edu | Information Technology Services
                 (919) 962-6344 | UNC - Chapel Hill


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

Date: 8 Oct 1997 13:25:06 GMT
From: "David Hayden" <dhayden@netcomuk.co.uk>
Subject: Using variable names from a flat file
Message-Id: <01bcd3ed$83285660$6502a713@fce04438.jubilee.ford.com>

In my perl program I have defined a scaler variable with 100 elemets:-

$data{1}.......$data[100]

I need to create a string ($output) with several of these elements appended
to each other, there will be many different combinations of elements.

Each combination will be put in a flat file such as the following examples

file1.txt
$data[7]  
$data[69]
$data[99]

file2.txt
$data[13]
$data[87]
$data[65]


file3.txt
$data[3]
$data[100]
$data[47]

My perl program will therefore perform the following steps:-:
- Select which flat file I will read from.
- OPEN the file selected
- Read each line at a time
- ****Take the value of the contents of the variable read in and
concatenate to $output
- Repeat until all lines have been done



However the problem is I cannot find out how to code the line marked ***
above.
I read in the variable name from the flat file but this gives me a string
rather than the value of the variable contained in the string.


I hope this is clear, an would be grateful for any assistance.



David Hayden





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

Date: Wed, 08 Oct 1997 14:44:33 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Using variable names from a flat file
Message-Id: <34419c2f.587323606@igate.hst.moc.com>

[cc'd automagically to original author]

On 8 Oct 1997 13:25:06 GMT, "David Hayden" <dhayden@netcomuk.co.uk>
wrote:

>I read in the variable name from the flat file but this gives me a string
>rather than the value of the variable contained in the string.

Check out the eval() function in Perl. It ought to do what you want.
:-)

Good Luck,

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: 8 Oct 1997 11:20:24 GMT
From: Tom.Grydeland@phys.uit.no (Tom Grydeland)
Subject: Re: Wanted: Wall/Schwartz book (1st ed)
Message-Id: <slrn63mr3n.oqb.Tom.Grydeland@mitra.phys.uit.no>

dks@mediaweb.com (dk smith) writes:
> >> Amcurious. Why is this sentiment held by so many? Is there some good
> >> content in the 1st edition that did not appear in the 2nd?

Paul A Sand <pas@unh.edu> writes:
> Paul> Yes. Most notably, a couple of chapters containing code snippets and
> Paul> complete scripts for performing useful tasks.

Randal Schwartz <merlyn@stonehenge.com> wrote:
> I looked at the resources we had, and the
> timeline, and those things fell below the cutline.

But it's coming again, isn't it?  I've heard rumors of a "cookbook"
somewhat like chps. 5 & 6 since I don't know when.
I just got the 1998 list from O'Reilly yesterday.  There's a _Perl in a
nutshell_ by S. Spainhour & N. Patwardhan in there, but that doesn't
seem to be "it".

(And I'm *still* waiting for the panther book9 to appear in Tromsx.
Grumble, grumble)

> When you've got four writers that all have day jobs, it's a bit like
> herding cats.

Four?  Who's the fourth?

> Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095

9 it *is* a panther, isn't it?

-- 
//Tom Grydeland <Tom.Grydeland@phys.uit.no>


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

Date: Wed, 8 Oct 1997 09:14:10 -0400
From: "Norbert McKenna" <norbmckenna@sprynet.com>
Subject: Where to get WIN95 Perl???
Message-Id: <61g0vh$gkt@wellspring.us.dg.com>

I have been trying to connect to www.activeware.com for about a week now and
keep getting a message about not being able to establish a connection with
the server. Is there any other sites that have WIN95 for Perl??

Norb





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

Date: Wed, 08 Oct 1997 14:43:21 GMT
From: zawodny@hou.moc.com (Jeremy D. Zawodny)
Subject: Re: Where to get WIN95 Perl???
Message-Id: <34409bde.587242900@igate.hst.moc.com>

[cc'd automagically to original author]

On Wed, 8 Oct 1997 09:14:10 -0400, "Norbert McKenna"
<norbmckenna@sprynet.com> wrote:

>I have been trying to connect to www.activeware.com for about a week now and
>keep getting a message about not being able to establish a connection with
>the server. Is there any other sites that have WIN95 for Perl??

They've apparently been having some DNS problems. I've had messages to
their lists queue for a few hours before making it through.

I believe their builds are also available via CPAN.

Jeremy
-- 
Jeremy Zawodny
Internet Technology Group
Information Technology Services
Marathon Oil Company, Findlay Ohio

http://www.marathon.com/

Unless explicitly stated, these are my opinions only--not those of my employer.


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 1144
**************************************

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