[20022] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2217 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 27 09:05:41 2001

Date: Tue, 27 Nov 2001 06:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1006869909-v10-i2217@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 27 Nov 2001     Volume: 10 Number: 2217

Today's topics:
    Re: A Perl Bug? (Helgi Briem)
        detecting if system call hangs on NT (John Menke)
        Emacs modules for Perl programming (Jari Aalto+mail.perl)
        Help calling C script within Perl <john.smith@hotmail.com>
    Re: Help calling C script within Perl <bernard.el-hagin@lido-tech.net>
    Re: Help calling C script within Perl <edgue@web.de>
    Re: Help calling C script within Perl <john.smith@hotmail.com>
    Re: I need helps for Perl/Nt and Db2 (Helgi Briem)
    Re: I need helps for Perl/Nt and Db2 <simon.oliver@umist.ac.uk>
    Re: make subset of the search result <bart.lateur@pandora.be>
    Re: New posters to comp.lang.perl.misc (Helgi Briem)
    Re: Perl script - display log file in browser <comdog@panix.com>
    Re: Problem with XML::DOM <noemail@---stealthmode---.com>
    Re: Problems with Mirror - ftp.pl doesn't get the right <bart.lateur@pandora.be>
    Re: RegEx question parsing filename from a path (Tor Fuglerud)
    Re: regexp (Anno Siegel)
    Re: regexp <michDEL_THIS@bsd.fr.eu.org>
    Re: regexp (Anno Siegel)
    Re: regexp <michDEL_THIS@bsd.fr.eu.org>
    Re: Serious Regexp help... (F. Xavier Noria)
    Re: System call return value 256 - Bad file descriptor (Bryce Pursley)
    Re: System call return value 256 - Bad file descriptor <godzilla@stomp.stomp.tokyo>
    Re: Top-posts <flavell@mail.cern.ch>
        var per url! <koertelt@melle-pufe.com>
    Re: var per url! (Rafael Garcia-Suarez)
    Re: var per url! <tintin@snowy.calculus>
    Re: Would this be global variables? <comdog@panix.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 27 Nov 2001 11:07:08 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: A Perl Bug?
Message-Id: <3c037331.3462330167@News.CIS.DFN.DE>

On Mon, 26 Nov 2001 12:42:58 -0600, "Jake Fan"
<jake@chaogic.com> wrote:

>I guess it's not.  To qualify as a helpdesk, all we now need is a desk -- a
>game of words can be fun.  The point is, it's good enough to call it a
>helpdesk.  It's a virtual helpdesk where everybody is a potential customer
>as well as operator.  And today's customers (newbies) can be tomorrow's
>operators (gurus).  It's based on the "one for all, all for one" premise.
>And oh, should I mention it's a non-profit helpdesk.

But here, there is always the danger of being answered
by a clueless moron like you or Godzilla.  A helpdesk 
usually has only clueful people like Randal, Uri or Tad
answering questions.  (My god, that would be a good 
helpdesk. ) 

Bottom line, if you treat clpm like a helpdesk, you
will be treated like a moron.

Regards,
Helgi Briem



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

Date: 27 Nov 2001 05:53:56 -0800
From: jmenke@scsnet.csc.com (John Menke)
Subject: detecting if system call hangs on NT
Message-Id: <3a2d73ac.0111270553.3fad0ac9@posting.google.com>

Can you detect if a system call hangs on NT?

I am using something like this:

system ("c:\\NETSVC OracleOraIAS90HTTPServer \\\\192.168.1.30 /stop");

How about backticks?

-john


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

Date: 27 Nov 2001 12:30:39 GMT
From: <jari.aalto@poboxes.com> (Jari Aalto+mail.perl)
Subject: Emacs modules for Perl programming
Message-Id: <perl-faq/emacs-lisp-modules_1006864131@rtfm.mit.edu>

Archive-name: perl-faq/emacs-lisp-modules
Posting-Frequency: 2 times a month
URL: http://tiny-tools.sourceforge.net/
Maintainer: Jari Aalto <jari.aalto@poboxes.com>

Announcement: "What Emacs lisp modules can help with programming Perl"

    Preface

        Emacs is your friend if you have to do anything comcerning software
        development: It offers plug-in modules, written in Emacs lisp
        (elisp) language, that makes all your programmings wishes come
        true. Please introduce yourself to Emacs and your programming era
        will get a new light.

    Where to find Emacs/XEmacs

        o   Unix:
            http://www.gnu.org/software/emacs/emacs.html
            http://www.xemacs.org/

        o   Windows
            http://www.gnu.org/software/emacs/windows/ntemacs.html
	    ftp://ftp.xemacs.org/pub/xemacs/windows/setup.exe

	o   More Emacs resources at 
	    http://tiny-tools.sourceforge.net/emacs-elisp.html


Emacs Perl Modules

    Cperl -- Perl programming mode

        .ftp://ftp.math.ohio-state.edu/pub/users/ilya/perl
        .<olson@mcs.anl.gov>           Bob Olson (started 1991)
        .<ilya@math.ohio-state.edu>    Ilya Zakharevich

        Major mode for editing perl files. Forget the default
        `perl-mode' that comes with Emacs, this is much better. Comes
        standard in newest Emacs.

    TinyPerl -- Perl related utilities

	.http://tiny-tools.sourceforge.net/

        If you ever wonder how to deal with Perl POD pages or how to find
        documentation from all perl manpages, this package is for you.
        Couple of keystrokes and all the documentaion is in your hands.

        o   Instant function help: See documentation of `shift', `pop'...
        o   Show Perl manual pages in *pod* buffer
        o   Load source code into Emacs, like Devel::DProf.pm
        o   Grep through all Perl manpages (.pod)
        o   Follow POD manpage references to next pod page with TinyUrl
        o   Coloured pod pages with `font-lock'
        o   Separate `tiperl-pod-view-mode' for jumping topics and pages
            forward and backward in *pod* buffer.
        o   TinyUrl is used to jump to URLs (other pod pages, man pages etc)
            mentioned in POD pages. (It's a general URL minor mode)

    TinyIgrep -- Perl Code browsing and easy grepping

        [TinyIgrep is included in the Kit]

        To grep from all installed Perl modules, define database to
        TinyIgrep. There is example file emacs-rc-tinyigrep.el that shows
        how to set up datatbases for Perl5, Perl4 whatever you have
        installed

        TinyIgrep calls Igrep.el to run the find for you, You can adjust
        recursive grep options, ignored case, add user grep options.

        You can get `igrep.el' module from <kevinr@ihs.com>. Ask for copy.
	Check also ftp://ftp.ihs.com/pub/kevinr/

    TinyCompile -- Browsing grep results in Emacs *compile* buffer

        TinyCompile is minor mode for *compile* buffer from where
        you can collapse unwanted lines, shorten the file URLs

            /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file1:NNN: MATCHED TEXT
            /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file2:NNN: MATCHED TEXT

            -->
            cd /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/
            file1:NNN: MATCHED TEXT
            file1:NNN: MATCHED TEXT

End



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

Date: Tue, 27 Nov 2001 12:07:05 -0000
From: "john smith" <john.smith@hotmail.com>
Subject: Help calling C script within Perl
Message-Id: <3c03823d_1@mk-nntp-1.news.uk.worldonline.com>

Can anyone help.
I have a perl script that needs to call a C script which performs a function
to build an encrypted key.
The output of the C script creates a text file that is then used in a shtml
pages lter down the line.

I have used the 'exec' command in a subroutine but realize this is not
appropriate as the script still ends once exec is encountered.

How should it be done.

Many thanks

Marcus


#!/usr/bin/perl -w
use CGI qw(:standard);
$user = "xxx";

&encrypt ();
print redirect("e:/domains/domain.co.uk/user/htdocs/newpage$user.shtml");


sub encrypt {
$user = "xxx";

($hour,$mday,$mon) = gmtime(time);
$acmon = $mon + 1;

$acyear = "2001";


if ($hour < 10) {
  $hour = "0$hour";
  }
if ($acmon < 10) {
  $acmon = "0$acmon";
  }
if ($mday < 10) {
  $mday = "0$mday";
  }

$stamp = "0001$hour$mday$acmon$acyear";
$unencryptedkey = "$stamp+password+$user";

exec ("encrypt.cgi -enc $unencryptedkey") || die "cannot run encrypt.cgi
$unencryptedkey\n";
}




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

Date: 27 Nov 2001 12:12:32 GMT
From: Bernard El-Hagin <bernard.el-hagin@lido-tech.net>
Subject: Re: Help calling C script within Perl
Message-Id: <slrna073mp.qsr.bernard.el-hagin@gdndev25.lido-tech>

On Tue, 27 Nov 2001 12:07:05 -0000, john smith <john.smith@hotmail.com> wrote:
> Can anyone help.
> I have a perl script that needs to call a C script which performs a function
> to build an encrypted key.
> The output of the C script creates a text file that is then used in a shtml
> pages lter down the line.
> 
> I have used the 'exec' command in a subroutine but realize this is not
> appropriate as the script still ends once exec is encountered.
> 
> How should it be done.


Use the system command.


perldoc -f system


Cheers,
Bernard


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

Date: Tue, 27 Nov 2001 13:13:51 +0100
From: Edwin =?iso-8859-1?Q?G=FCnthner?= <edgue@web.de>
Subject: Re: Help calling C script within Perl
Message-Id: <3C03837F.8B963356@web.de>



john smith wrote:
> 
> Can anyone help.
> I have a perl script that needs to call a C script which performs a function

Just wondering: what is a C _script_? Normally a C program is compiled
into a native executable ...


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

Date: Tue, 27 Nov 2001 13:10:40 -0000
From: "john smith" <john.smith@hotmail.com>
Subject: Re: Help calling C script within Perl
Message-Id: <3c039123$1_2@mk-nntp-1.news.uk.worldonline.com>

Thanks.

Have used the system command and now seems to be working as it should.
I still have problems with the C code - but that's another newsgroup.

Thank you again.

Marcus

Bernard El-Hagin <bernard.el-hagin@lido-tech.net> wrote in message
news:slrna073mp.qsr.bernard.el-hagin@gdndev25.lido-tech...
> On Tue, 27 Nov 2001 12:07:05 -0000, john smith <john.smith@hotmail.com>
wrote:
> > Can anyone help.
> > I have a perl script that needs to call a C script which performs a
function
> > to build an encrypted key.
> > The output of the C script creates a text file that is then used in a
shtml
> > pages lter down the line.
> >
> > I have used the 'exec' command in a subroutine but realize this is not
> > appropriate as the script still ends once exec is encountered.
> >
> > How should it be done.
>
>
> Use the system command.
>
>
> perldoc -f system
>
>
> Cheers,
> Bernard




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

Date: Tue, 27 Nov 2001 11:46:09 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: I need helps for Perl/Nt and Db2
Message-Id: <3c037b28.3464368919@News.CIS.DFN.DE>

On Tue, 27 Nov 2001 10:01:36 GMT, "Stefano Monteverde"
<stefano.monteverde@tin.it> wrote:

>Hello: first, excuse me for my english (...and italian too)
>I am experienced on mainframe but beginner with PERL and i need to read data
>on Db2 on MVS-OS/390.
>Does anyone ever try to do the same i do?
>I have installed Nt 4.0, sp 6, IIS 4.0, ActivePerl 5.6.1, PPm 3.0!
>I now that is necessary to use the DBI... probably with special interface,
>but what?
>Can someone tell me what can i do? (before to change job)

For all database interactions in Perl you need DBI,
so get a command line and install it, like so:
C:>ppm install DBI

# PPM may not work if you have a proxy server/
#firewall, so read
#file:///C:/Perl/html/Components/ppmproxy.htm or
# perldoc PPM  to learn what to do about that.

Second, you need an interface for DB2.  I have
no idea what DB2 might be, so I had a look:
C:>ppm search db2 

#gives me the following:
Packages available from
http://ppm.ActiveState.com/cgibin/PPM/
ppmserver.pl?urn:/PPMServer:
DBD-DB2 [0.75] Perl driver for IBM DB2 Universal Database

#Voila!

C:>ppm install DBD-DB2 installs the thing

And to learn how to use it:
C:>perldoc DBD::DB2
gives me usage and example code.

Regards,
Helgi Briem




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

Date: Tue, 27 Nov 2001 13:05:34 +0000
From: Simon Oliver <simon.oliver@umist.ac.uk>
To: Stefano Monteverde <stefano.monteverde@tin.it>
Subject: Re: I need helps for Perl/Nt and Db2
Message-Id: <3C038F9E.EDEEE893@umist.ac.uk>

I'm no DB2 expert but I'm guessing that you need DBD::ODBC or DBI::DB2 -
these are both available via PPM

To use DBD::ODBC you will need to install a DB2 ODBC driver and probably
the client libraries.

To use DBD::DB2 you'll need to install the DB2 client libraries for NT.

Also look at:

http://www.software.ibm.com/data/db2/perl

--
  Simon Oliver


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

Date: Tue, 27 Nov 2001 12:07:53 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: make subset of the search result
Message-Id: <50070ukuln3pvoddd925kgkcl7rg4ecmns@4ax.com>

qiang wrote:

>Logan Shaw wrote:

>> The other approach is to do the whole query all at once and store the
>> extra results somewhere.  Storing them in a temporary file is not a
>> half bad idea, although you end up having to parse the temporary file
>> every time.  In some cases, that won't actually speed anything up.

>>only in some cases would that be a good idea.

>hmm, above approach sounds need lots HD space..or maybe i can delete the 
>tmp file using a cron job.  but i am insterested in it.   

You could store only the 20 or so most recently used results, using a
LRU algorithm (as common in virtual memory / disk cache managers). That
would most definitely keep some requirements under control.

You could also expire the search and discard the search result if people
didn't ask for it again within, say, 5 minutes. (time-out)

In addition I'd like to add the people usually aren't interested in
browsing through more than, say, 5 pages, before giving up and refining
the search. So if you show 10 results per page, you needn't store more
than the first 50 or so. There most definitely isn't any need at all to
store thousands.

As Logan said: starting to search again from scratch might well be
faster than refining the search based upon stored results. The chance of
introducing bugs is smaller that way, too.

-- 
	Bart.


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

Date: Tue, 27 Nov 2001 11:20:42 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: New posters to comp.lang.perl.misc
Message-Id: <3c037691.3463194661@News.CIS.DFN.DE>

On Mon, 26 Nov 2001 18:26:03 GMT, Bart Lateur
<bart.lateur@pandora.be> wrote:

>Greg Bacon wrote:
>
>>Top 10 Posters by Volume
>>========================
>
>>  33.8 ( 18.0/ 15.6/  9.1)     19  Bart Lateur <bart.lateur@pandora.be>
>
>Yeah I 'm new!
>
>Just a change of address, folks.
    9    11.3 (  6.7/  4.6/  2.7)  helgi@decode.is

I'm not new either.  I've been here for years
but since my news server barfed for a few 
months and didn't propagate my posts
I switched to one that wouldn't allow me
to spamblock.  I now receive more spam 
in a day than I formerly received in a month.
What is a guy to do?

Regards,
Helgi Briem



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

Date: Tue, 27 Nov 2001 07:35:46 -0600
From: brian d foy <comdog@panix.com>
Subject: Re: Perl script - display log file in browser
Message-Id: <comdog-F5FA07.07354627112001@news.panix.com>

In article <b09860cc.0111270123.471738a3@posting.google.com>, 
eguttridge@buildonline.com (bigpig) wrote:

> I am looking for some example code to reside in /cgi-bin which will
> display a UNIX log file (eg. /var/adm/messages) in a browser. All
> example code is appreciated.

no need for any code.  in the browseable directory, just
make a symlink to /var/adm/messages, and protect it
accordingly.

-- 
brian d foy <comdog@panix.com> - Perl services for hire
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: Tue, 27 Nov 2001 08:56:51 -0500
From: M Pritchard <noemail@---stealthmode---.com>
Subject: Re: Problem with XML::DOM
Message-Id: <MPG.166d65b2ca27c3cc989790@news1.server.wcom.com>

Thanks a lot Matt.

It looks a lot like a processing instruction so I was confused.

After looking in the XML::DOM documentation I think I see where to 
specify the info for the declaration.

Thanks again!

In article <eb3031b9.0111270144.7c239fe8@posting.google.com>, 
msergeant@star.net.uk says...
> M Pritchard <noemail@---stealthmode---.com> wrote in message news:<MPG.166c0cba42b2212798978d@news1.server.wcom.com>...
> > Hello
> > 
> > I've been using ActivePerl on a Windows NT machine and I've just started 
> > playing with the XML::DOM package.  I seem to be having a strange problem 
> > with the createProcessingInstruction function.
> 
> The XML declaration (the <?xml version="1.0"?> bit) isn't a processing
> instruction, and processing instructions beginning with <?xml are
> illegal in XML. So the DOM throws you an error. The XML declaration is
> supposed to be created by the DOM serialisation, and you should be
> able to specify the version and so on at DOM creation time, though I
> don't know the DOM API off the top of my head.
> 


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

Date: Tue, 27 Nov 2001 13:26:05 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Problems with Mirror - ftp.pl doesn't get the right octal for chmod
Message-Id: <m2570usdn21uvfnh1dfmvvpoqmesf6hc0v@4ax.com>

Dirk wrote:

>thanx for your efforts to solve my problem.
>I tested 
>
>    &send( sprintf( "SITE CHMOD %o %s", $mode, $path ) );
>
>and got the same effect: 
>---> SITE CHMOD 100644 Testfile.txt
>501 CHMOD: Mode value must be between 0 and 0777 
>
>Tests with Bart's: 
>
>        &send( sprintf( "SITE CHMOD %o $path", 0777 & $mode ) );
>
>worked fine. 

You should combine the two.

        &send( sprintf( "SITE CHMOD %o %s", 0777 & $mode, $path ) );

It's safer.

-- 
	Bart.


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

Date: Tue, 27 Nov 2001 13:46:42 GMT
From: t.k.fuglerud@hf.uio.no (Tor Fuglerud)
Subject: Re: RegEx question parsing filename from a path
Message-Id: <3c039852.8316718@nntp.uio.no>

On 23 Oct 2001 13:59:22 -0700, jmenke@scsnet.csc.com (John Menke) wrote:

>I need to extract the filename from a path statement
>
>I will have something like this: 
>"C:\ORACLE\ORADATA\DBNAME\TEMP01.DBF" in a variable named $filepath
>
>how do I get just the TEMP01.DBF into a variable?

/([^\\]*$)/;    
$filename = $1;

TorF


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

Date: 27 Nov 2001 12:07:59 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: regexp
Message-Id: <9tvvmv$7kr$1@mamenchi.zrz.TU-Berlin.DE>

According to Michael L. Hostbaek <michDEL_THIS@bsd.fr.eu.org>:
> Paul Boardman tried to tell us something, and all I got was:
> >  "Michael L. Hostbaek" wrote:
> >  
> >  $svin =~ s/,/./g;
> >  
> >  should work fine for you.
> >  
> 
> OK.
> 
> The problem is as follows. (Stupid me, for not seing the backwards
> substitution)
> 
>  $q->param("price_$i") =~ s/,/./g; 
> Gives the error:
> [Tue Nov 27 12:20:32 2001] [error] Can't modify non-lvalue subroutine
> call at /web/htdocs/ora/user.pl line 724.
> 
> However, if I do like this:
> $svin =  $q->param("price_$i");
> $svin =~ s/,/./g;
> 
> Then it works just fine ???? Go figure...

Why, sure.  s/// is one of the Perl operators that modify their
operands.  More explicitly, these operators change the value they
are given and assign the result back to where it came from.  This
means that an operand must be capable of being assigned to, that is,
it must be a variable (or part of an aggregate variable), as opposed
to an arbitrary expression.  Operands of this type are called "lvalues"
because they can appear on the left side of an assignment.

Sub calls normally don't fall in that category, so you get the message
you quoted.

Anno


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

Date: 27 Nov 2001 12:11:55 GMT
From: "Michael L. Hostbaek" <michDEL_THIS@bsd.fr.eu.org>
Subject: Re: regexp
Message-Id: <slrna070ob.30nf.michDEL_THIS@freebsdcluster.dk>

Anno Siegel tried to tell us something, and all I got was:
>  
>  Why, sure.  s/// is one of the Perl operators that modify their
>  operands.  More explicitly, these operators change the value they
>  are given and assign the result back to where it came from.  This
>  means that an operand must be capable of being assigned to, that is,
>  it must be a variable (or part of an aggregate variable), as opposed
>  to an arbitrary expression.  Operands of this type are called "lvalues"
>  because they can appear on the left side of an assignment.
>  
>  Sub calls normally don't fall in that category, so you get the message
>  you quoted.

So, to make it function properly, I'll have to use the latter example ?
(I mean, creating a temp variable - and use that in my while loop) ??

Thanks

-- 
Regards,
Michael L. Hostbaek
-= Thanks for all the fish.. =-



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

Date: 27 Nov 2001 12:21:54 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: regexp
Message-Id: <9u00h2$7kr$2@mamenchi.zrz.TU-Berlin.DE>

According to Michael L. Hostbaek <michDEL_THIS@bsd.fr.eu.org>:
> Anno Siegel tried to tell us something, and all I got was:
> >  
> >  Why, sure.  s/// is one of the Perl operators that modify their
> >  operands.  More explicitly, these operators change the value they
> >  are given and assign the result back to where it came from.  This
> >  means that an operand must be capable of being assigned to, that is,
> >  it must be a variable (or part of an aggregate variable), as opposed
> >  to an arbitrary expression.  Operands of this type are called "lvalues"
> >  because they can appear on the left side of an assignment.
> >  
> >  Sub calls normally don't fall in that category, so you get the message
> >  you quoted.
> 
> So, to make it function properly, I'll have to use the latter example ?
> (I mean, creating a temp variable - and use that in my while loop) ??

Basically, yes.  There may be other ways, but they will all involve
storing the value somewhere (temporarily or permanently) before you
change it.

Anno


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

Date: 27 Nov 2001 12:38:25 GMT
From: "Michael L. Hostbaek" <michDEL_THIS@bsd.fr.eu.org>
Subject: Re: regexp
Message-Id: <slrna072a1.30nf.michDEL_THIS@freebsdcluster.dk>

Anno Siegel tried to tell us something, and all I got was:
>  Basically, yes.  There may be other ways, but they will all involve
>  storing the value somewhere (temporarily or permanently) before you
>  change it.
>  

OK - great. 

Thank you for your assistance.

-- 
Regards,
Michael L. Hostbaek
-= Thanks for all the fish.. =-



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

Date: 26 Nov 2001 07:05:16 GMT
From: fxn@retemail.es (F. Xavier Noria)
Subject: Re: Serious Regexp help...
Message-Id: <9tspjc$502ct1@news1s.iddeo2.es>

On Sun, 25 Nov 2001 21:50:07 -0700, Ashley M. Kirchner <ashley@pcraft.com> wrote:

:     I need to break each line in this text (wrapping alert):
: 
: 4x6                 1        4"x6" Standard Print (full-frame from 35mm) Image:Uploaded Image 1     .75     $0.75
: 
: 4x6                 1        4"x6" Standard Print (full-frame from 35mm) Image:Uploaded Image 2     .75     $0.75
: 
: 5x7.5               1        5x7.5 Image:Uploaded Image 3      4.25     $4.25
: 
: 8x12                1        8x12 Classic Full Frame Image:Uploaded Image 4   10.25    $10.25
:
:     ...into 6 pieces. Based on the first line, I need:
: 
:     1.  4x6
:     2.  1
:     3.  4"x6"
:     4.  Standard Print (full-frame from 35mm) Image:Uploaded Image 1
:     5.  .75
:     6.  $0.75

This could be a trick. I don't know whether it actually solves the
problem in all the cases you'll encounter, it certainly won't work if
the fourth field may have tabs or more than one space in a row because
it won't be join()ed back correctly:

    @fields = split;
    ($first, $second, $third) = @fields;
    ($fourth) = join ' ', @fields[3..($#fields - 2)];
    ($fifth, $sixth) = @fields[-2, -1];

-- fxn


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

Date: Tue, 27 Nov 2001 12:27:33 GMT
From: hbpursle@duke-energy.com (Bryce Pursley)
Subject: Re: System call return value 256 - Bad file descriptor
Message-Id: <3c0584f0.78783464@news.infoave.net>

What you read as "impatience" is merely "need."  What you obviously
NEVER read was my original note which clearly stated that everything I
have READ about that error message was "generic" and didn't help me
with my problem.  I HAD already researched it and when I couldn't find
what I needed I came to this group looking for some "experience" and
"help" and all I got was NOTHING.

I hope when you really need some help from somebody you get help just
like you gave me.  One big dose of arrogance and a big pile of useless
chatter that tells me you have nothing to give.

You give this group a bad name.  I guess that's why you don't even
want to use yours.

SINCERLY,
Bryce 

On Mon, 26 Nov 2001 12:58:20 -0800, "Godzilla!"
<godzilla@stomp.stomp.tokyo> wrote:

>Bryce Pursley wrote:
>
>> Godzilla! wrote:
>> >Bryce Pursley wrote:
>
>(snipped - topic is a bad file descriptor error message)
>
>> > > A line of code that has worked for over a month has all of a sudden
>> > > gone "intermittent."  One day it won't work at all and the next day it
>> > > will work on every other file passed to it.
>
>> > Nothing else needs to be said. It is clear based on your
>> > statements something has changed. Either ascertain what
>> > you have changed or contact your server and ascertain
>> > what they have changed. Doing so will provide you with
>> > a clear definitive answer.
> 
>> Yes I agree completely.  I have followed that very line of questioning
>> down several avenues and have yet to come up with any useful replies.
>> So, in the meantime, I decided I'd see if someone could help me
>> understand a little better what "Bad file descriptor" might REALLY be
>> saying.  That way, I might have a chance to fix this problem sooner
>> rather than later.
> 
>
>A request borne of impatience is a personal quality I do not admire.
>
>Your favorite internet search engine will return literally thousands
>of links related to http protocal, socket protocal, redirect protocal,
>open protocal, system open protocal and MAC system problems,
>all and more, associated with a bad file descriptor.
>
>With your impatience clearly displayed, I am surprised you have not
>immediately begun researching and reading about this problem.
>
>
>Godzilla!



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

Date: Tue, 27 Nov 2001 04:43:39 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: System call return value 256 - Bad file descriptor
Message-Id: <3C038A7B.362C14F4@stomp.stomp.tokyo>

Bryce Pursley wrote:

> Godzilla!"
> > Bryce Pursley wrote:
> > > Godzilla! wrote:
> > > >Bryce Pursley wrote:

(snipped - topic is a bad file descriptor error message)

> > A request borne of impatience is a personal quality I do not admire.

> > Your favorite internet search engine will return literally thousands
> > of links related to http protocal, socket protocal, redirect protocal,
> > open protocal, system open protocal and MAC system problems,
> > all and more, associated with a bad file descriptor.

> > With your impatience clearly displayed, I am surprised you have not
> > immediately begun researching and reading about this problem.


> What you read as "impatience" is merely "need."  What you obviously
> NEVER read was my original note which clearly stated that everything I
> have READ about that error message was "generic" and didn't help me
> with my problem.  I HAD already researched it and when I couldn't find
> what I needed I came to this group looking for some "experience" and
> "help" and all I got was NOTHING.
> 
> I hope when you really need some help from somebody you get help just
> like you gave me.  One big dose of arrogance and a big pile of useless
> chatter that tells me you have nothing to give.
 
> You give this group a bad name.  I guess that's why you don't even
> want to use yours.


Would you like some cheese with your whine?


Godzilla!


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

Date: Tue, 27 Nov 2001 13:00:22 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Top-posts
Message-Id: <Pine.LNX.4.30.0111271249030.16273-100000@lxplus023.cern.ch>

On Nov 27, Sheila King inscribed on the eternal scroll:

[you know, I didn't really want to pursue this off-topic issue any
further, but you've asked me a straight question, so here's a straight
answer...]

> On Tue, 27 Nov 2001 02:51:37 +0100, "Alan J. Flavell"
>
> :Oh, but it _is_ the better way of doing things!  That's exactly where
> :the cursor needs to be so that the respondent can start snipping
> :extraneous quotage, in agreement with the long-standing rules of
> :netiquette.
>
> ??? Surely, you jest.

Actually, no, I don't.  It's precisely where the newsreaders that I
have ever used will position the cursor when I call-out a reply or
followup; and it's as close as any automated process could be expected
to get it, to where I need it to be for progressively trimming the
quotage and composing the interleaved responses. I wouldn't want that
to change.

> It seems to me that it just makes it easier for those people to ignore
> all the quoted material at the bottom and post full, unsnipped, quotes.

You can lead a horse to water...

all the best



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

Date: 27 Nov 2001 12:20:42 +0200
From: Benjamin Koertelt <koertelt@melle-pufe.com>
Subject: var per url!
Message-Id: <3c03770a$1@netnews.web.de>

hi group!


i have some problems:


i want to pass my index.cgi a var (a path, for example http://www.perl.com/)
and now i want to create a frameset, like:


 ...
<frame src=\"$url\" name=\"main\" noresize>\n";
 ...


any idea?


thanks, ben
-- 
__________________________________________________________
News suchen, lesen, schreiben mit http://newsgroups.web.de


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

Date: 27 Nov 2001 11:29:36 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: var per url!
Message-Id: <slrna06uao.85m.rgarciasuarez@rafael.kazibao.net>

Benjamin Koertelt wrote in comp.lang.perl.misc:
} 
} i want to pass my index.cgi a var (a path, for example http://www.perl.com/)
} and now i want to create a frameset, like:
} 
} 
} ...
} <frame src=\"$url\" name=\"main\" noresize>\n";
} ...
} 
} 
} any idea?

No : your question is not understandable and has probably nothing to do
with Perl. I guess that you have an HTML or a CGI problem. Ask in the
appropriate newsgroup.

-- 
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/


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

Date: Tue, 27 Nov 2001 23:08:09 +1100
From: "Tintin" <tintin@snowy.calculus>
Subject: Re: var per url!
Message-Id: <3c0381c7_2@news.iprimus.com.au>


"Benjamin Koertelt" <koertelt@melle-pufe.com> wrote in message
news:3c03770a$1@netnews.web.de...
> hi group!
>
>
> i have some problems:
>
>
> i want to pass my index.cgi a var (a path, for example
http://www.perl.com/)
> and now i want to create a frameset, like:
> ...
> <frame src=\"$url\" name=\"main\" noresize>\n";
> ...

Do you think this is different to processing any other parameters to a CGI
script?




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

Date: Tue, 27 Nov 2001 07:36:15 -0600
From: brian d foy <comdog@panix.com>
Subject: Re: Would this be global variables?
Message-Id: <comdog-AE8117.07361527112001@news.panix.com>

In article <e756f30f.0111270134.2cbc7f83@posting.google.com>, 
adrook@yahoo.com (Kit) wrote:

> Just a quick question.  I am writing a single script.  I need to use
> variables defined in one subroutine in another subroutine.  How would
> I do this?  Would this be declaring global variables?  Thanks!

rewrite the subroutines so they don't need to do that.

-- 
brian d foy <comdog@panix.com> - Perl services for hire
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 V10 Issue 2217
***************************************


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