[12051] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5651 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 13 12:13:40 1999

Date: Thu, 13 May 99 09:00:23 -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           Thu, 13 May 1999     Volume: 8 Number: 5651

Today's topics:
    Re: "Text file busy" error <gellyfish@gellyfish.com>
        Attaching to run away perl program <pderbeko@iil.intel.com>
    Re: Attaching to run away perl program <dgris@moiraine.dimensional.com>
    Re: Better solution ? (Sami Rosenblad)
        Distributing perl-code in different files, how? <fabascal@gredos.cnb.uam.es>
        don't take care about the caps slegarre@ireste.fr
    Re: don't take care about the caps (Alastair)
        Dynamic generation of a hash simon@whitestar99.demon.co.uk
        File Directory and read File (Raymond Ip)
    Re: File Directory and read File (Bob Trieger)
    Re: File Directory and read File (Tad McClellan)
    Re: File Directory and read File <perlguy@technologist.com>
    Re: FLOCK When? (Tad McClellan)
    Re: Getting a DNS record <devans@radius-retail.kom>
    Re: How can i create DLL from perl script ? <gellyfish@gellyfish.com>
    Re: japh tags (Greg Bacon)
        Looking for an autoresponder script ! (Walter)
        Looking for autoresponder script ! (Walter)
        multiple postings with the subject: vb2perl <106274.2233@compuserve.com>
    Re: OPEN command doesn't work on NT machine <devans@radius-retail.kom>
        pattern matching ? tvn007@my-dejanews.com
    Re: pattern matching ? <anybody@ml.com>
    Re: pattern matching ? (Tad McClellan)
    Re: print to STDOUT and a file at the same time? (Greg Bacon)
        Re-reading CGI form data.  (Brian Seitz)
    Re: REGULAR EXPRESSION problems (Tad McClellan)
    Re: send a PDF file <gellyfish@gellyfish.com>
    Re: sendmail misbehaving <csx1jw@ee.surrey.ac.uk>
        Shopping Cart waxpack@my-dejanews.com
    Re: tcgrep not expanding command-line wildcards <gellyfish@gellyfish.com>
    Re: Ten Tips toward *DIVERSITY COMPLIANCE* in Web Desig (Sitaram Chamarty)
        Threads: object method coderef syntax? (Jedi Master Yoda)
    Re: translating FAT to VFAT <jfm@bigfoot.de>
        vb2perl <106274.2233@compuserve.com>
        Where is SMPT.pl ? <pkotala@logis.cz>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 12 May 1999 12:16:53 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: "Text file busy" error
Message-Id: <37396325@newsread3.dircon.co.uk>

Timothy Larson <larsot2@krypton.mankato.msus.edu> wrote:
> 
> Thanks, I will try closing my data files explicitly.  However, given that
> Perl is (in general) so good with error messages, you'd think it would tell
> me that it is my data files that are busy, not the perl files.
> I'm not very hopeful on this one, because I've hit the same problem a few
> times with a form-to-email script that doesn't open data files.
> My platform, BTW, is linux 2.0.34.  We're running perl5 here, too.
> 

You really arent listening to me are you ? Look:

   sys0001 [figment] $ cc test.c
   test.c
   sys0001 [figment] $ cp a.out oit
   sys0001 [figment] $ oit &
   [1]     16084
   sys0001 [figment] $ cp a.out oit
   cp: cannot create oit
   cp: Text file busy

The 'Text file busy' message on Unix is very specific to these sort of
cases - and has nothing whatsoever to do with your datafiles unless they
happen to be the binaries for a running application.  If your system is
giving that error when you are simply opening and closing some simple
datafiles then it is broken WRT its error messages.  

Unfortunately you havent posted any code so I still cant be more specific.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Thu, 13 May 1999 17:25:34 +0300
From: Philip Derbeko <pderbeko@iil.intel.com>
Subject: Attaching to run away perl program
Message-Id: <373AE0DE.8E5EE59E@iil.intel.com>

Hello people.

I have a Perl program which runs for a couple of hours and after about 4
hours of run it
runed into infinite loop , at least it eats 98% CPU and prints nothing
to the log file.
I wonder if there is a way to attach to the program and check whats
wrong , as can be done
with pure executables.

Thanks in advance

Philip Derbeko




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

Date: 13 May 1999 08:39:05 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Attaching to run away perl program
Message-Id: <m34slhc9va.fsf@moiraine.dimensional.com>

Philip Derbeko <pderbeko@iil.intel.com> writes:

> I wonder if there is a way to attach to the program and check whats
> wrong , as can be done with pure executables.

Of course you can attach a debugger to a running perl process.  It's
no different than any other large program written in C.

dgris
-- 
Daniel Grisinger          dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print 
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'


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

Date: Thu, 13 May 1999 17:44:05 +0300
From: blade@leela.janton.fi (Sami Rosenblad)
Subject: Re: Better solution ?
Message-Id: <blade-1305991744050001@durandal.janton.fi>

In article <7hch1l$hhs$1@nnrp1.deja.com>, tvn007@my-dejanews.com wrote:

> Hi,
> 
> Here is the problem:
> 
> To pad 2000 "X" to thousand of lines
> 
> Here is my solution
> 
> for ($number =0; $number < 2000; $number++) {
> 
>     $first_line = X.$first_line;
>     $second_line = X.$second_line;
> 
>      ...
> 
>     $thousand_line = X.$thousand_line;
> }
> 
> Does anyone has better solution without goes through
> the for loop.

try:

push @lines, 'X' x 2000 foreach (0..1999);

to get a 2000-element array of 2000 X's in each.

-- 
Sami Rosenblad -- blade@leela.janton.fi -- running linux since 1999


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

Date: Thu, 13 May 1999 14:22:16 +0200
From: Federico Abascal <fabascal@gredos.cnb.uam.es>
Subject: Distributing perl-code in different files, how?
Message-Id: <373AC3F8.641E919@gredos.cnb.uam.es>

Hello, could anybody tell me how to distribute code in different files?
And if the program speed slows doing that.
Thanks in advance, excuse my english and excuse I don't want to loose
hours looking at perl-documentation (I have read about packages but I
want to know if is there some way to do that more C-like)



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

Date: Thu, 13 May 1999 08:57:29 GMT
From: slegarre@ireste.fr
Subject: don't take care about the caps
Message-Id: <7he45p$s85$1@nnrp1.deja.com>

hello,

I want to build a test on a variable but I don't want to take care
about the caps.
I mean for application this two expressions must be the same:
         test and TEST

I try with this !/$Var/ but it's always right.

Thanks for your help.


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: Thu, 13 May 1999 09:58:11 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: don't take care about the caps
Message-Id: <slrn7jlc48.5g.alastair@calliope.demon.co.uk>

slegarre@ireste.fr <slegarre@ireste.fr> wrote:
>hello,
>
>I want to build a test on a variable but I don't want to take care
>about the caps.

You should look at the docs on regex e.g. 

perldoc perlre

In particular, look at the 'i' modifier.

HTH.

-- 

Alastair
work  : alastair@psoft.co.uk
home  : alastair@calliope.demon.co.uk


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

Date: Thu, 13 May 1999 09:13:16 GMT
From: simon@whitestar99.demon.co.uk
Subject: Dynamic generation of a hash
Message-Id: <7he53b$smv$1@nnrp1.deja.com>

Hi,

I am thinking of using something like the following to generate a
lookup hash. My only concern is that using the eval() is inefficient
but I can't seem to think of a better way. Also when the code is
running and someone supplies a string is there a way round using the
same eval method to get the value?

NB: I am not bothered with keys that are overwritten, if somebody wants
an animal they will have to be more specific :-)

#!/bin/perl

my %hash;
genHash(\%hash, 'a big animal', 'camel');
genHash(\%hash, 'a small animal', 'ferret');

sub genHash {
  my($hash, $string, $value) = @_;

  my @words = split /\s+/, $string;

  while(@words){
    $string = "\$hash->{".join("}{",@words)."} = $value";
    eval $string;
    shift @words;
  }
}

Any advice or comments would be appreciated.

Simon


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: 13 May 1999 09:39:09 GMT
From: rwmip@glink.net.hk (Raymond Ip)
Subject: File Directory and read File
Message-Id: <7he6jt$9b7$1@unix2.glink.net.hk>

I want to know that how can I read a directory to get all the files's
filename and copy it to another place. 

AND 

How can I read a text file to get the each line content ?



Best Regards


Raymond Ip


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

Date: Thu, 13 May 1999 10:27:52 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: File Directory and read File
Message-Id: <7he8am$7bh$1@oak.prod.itd.earthlink.net>

[ courtesy cc sent by mail if address not munged ]
     
rwmip@glink.net.hk (Raymond Ip) wrote:
>I want to know that how can I read a directory to get all the files's
>filename and copy it to another place. 
>
>AND 
>
>How can I read a text file to get the each line content ?

RTFM!

perldoc perlfunc
perldoc -f opendir
perldoc -f readdir
perldoc -f closedir
perldoc -f open
perldoc -f close



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

Date: Thu, 13 May 1999 05:29:40 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: File Directory and read File
Message-Id: <426eh7.791.ln@magna.metronet.com>

Brent Michalski (perlguy@technologist.com) wrote:

: Raymond Ip wrote:
: > 
: > I want to know that how can I read a directory to get all the files's
: > filename and copy it to another place.
                 ^^^^
: Take a look at the "readdir" and "rename" functions.


   rename() does not copy, it moves.


   the File::Copy module copies though.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 13 May 1999 07:45:19 -0500
From: Brent Michalski <perlguy@technologist.com>
Subject: Re: File Directory and read File
Message-Id: <373AC95F.7D4A5AA5@technologist.com>



Raymond Ip wrote:
> 
> I want to know that how can I read a directory to get all the files's
> filename and copy it to another place.
Take a look at the "readdir" and "rename" functions.

> 
> AND
> 
> How can I read a text file to get the each line content ?
Take a look at the "open" function.

> 
> Best Regards
> 
> Raymond Ip

Please note that this list *IS* the right place to come for Perl
programming help, it does *not* exist as a replacement for reading the
documentation.  As much as *I* hate reading any documentation, I have to
admit that Perl comes with some great docs!

Good luck!
Brent


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

Date: Thu, 13 May 1999 05:35:07 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: FLOCK When?
Message-Id: <bc6eh7.791.ln@magna.metronet.com>

joeyandsherry@mindspring.com wrote:

: I am newly learning Perl. I use a script to read a database file, the
: process is simple Open it, read it, close it. This should only take an
: instant. Should I use flock anywhere in this process? 


   How long it takes does not influence whether or not you
   need file locking.

   You need file locking if there is the possibility of concurrent
   access to the file (with at least one of the accesses being
   for writing).

   So you do not need file locking if you are *only* reading the file.


: I currently use flock
: when rewriting to a temp db while deleting a record, and I assume this is
: all for security and the assurance of stable data integrity.


   File locking has nothing to do with security, it has only to
   do with data integrity.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 13 May 1999 08:57:20 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: Getting a DNS record
Message-Id: <7he3nb$3ovf1@news.gomontana.com>

Investigate Net::DNS from CPAN. (http://www.cpan.org).

voxelman@my-dejanews.com wrote in message <7hdjp0$gfk$1@nnrp1.deja.com>...
>I have an application that needs to obtain the mx handle (mail
>exchanger, mail server) for a domain to be passed to the application. Is
>there a way to do this in Perl? If not or if there is an easier way to




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

Date: 12 May 1999 12:55:52 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How can i create DLL from perl script ?
Message-Id: <37396c48@newsread3.dircon.co.uk>

feketeroland11@my-dejanews.com wrote:
> Help me! Help me!
> Can i create windows 95/NT .dll from a perl script?
> If it's possible, how ???

No it is not possible.  It might be possible to be embed a Perl interpreter
into a DLL however.

Anyhow why would you want to do it ?

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: 13 May 1999 14:54:29 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: japh tags
Message-Id: <7hep35$816$1@info2.uah.edu>

In article <7hdbr3$b2u$1@nnrp1.deja.com>,
	todd_b_smith@my-dejanews.com writes:
: Let's get a thread going with people's tag lines that print "Just
: Another Perl Hacker." I've seen lots, but now I want to see them all!

I was pretty pleased with myself for writing this one:

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

Greg
-- 
A lot of people mistake a short memory for a clear conscience. 
    -- Doug Larson


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

Date: Thu, 13 May 1999 12:44:32 GMT
From: 2Winning@bigfoot.com (Walter)
Subject: Looking for an autoresponder script !
Message-Id: <373ac919.81557630@news.datacomm.ch>

Hello,

im looking for a perl-script for autoresponders, which i can offer to
other users on my domaine ! (for example like: smartbot.net,
myreply.com or zinfo.net)

Who knows about such a script ? Who know where i can get it ?

Regards 
Walter



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

Date: Thu, 13 May 1999 13:14:59 GMT
From: 2Winning@bigfoot.com (Walter)
Subject: Looking for autoresponder script !
Message-Id: <373ac64c.80840432@news.datacomm.ch>

Hello,

im lookin for an script for auroresponders, which i can offer to users
on my own domaine !

Regards
Walter


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

Date: Thu, 13 May 1999 12:37:01 +0200
From: "Nokian" <106274.2233@compuserve.com>
Subject: multiple postings with the subject: vb2perl
Message-Id: <7hec3d$gfs@selena.rz.uni-duesseldorf.de>

Hi,

I apologize for the mulitple postings on the subject: vb2perl, and for
crossposting. I will take more care in the future, that my posting are on
topic.
As for the multiple postings, it seems that my newsreader did not get an
answer from the newsserver, and therefore tried to send my message over and
over again.

Nokian




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

Date: Thu, 13 May 1999 08:55:23 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: OPEN command doesn't work on NT machine
Message-Id: <7he3jg$3n5e1@news.gomontana.com>

I'm guessing... maybe the current working directory of the script isn't what
you think it is?

KW Lee wrote in message <373A776E.B1421AF5@infineon.com>...
>Hi,
>
>I'm migrating al my .pl files from a UNIX machine to an NT machine.
>There is one part of the code that needs to read a data file in the same
>directory as the .pl file. It works fine on the UNIX machine previously,
>but failed when running on NT machine.




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

Date: Thu, 13 May 1999 09:32:24 GMT
From: tvn007@my-dejanews.com
Subject: pattern matching ?
Message-Id: <7he678$te6$1@nnrp1.deja.com>

Hi,

Would someone help me on this ?

Problem:

I have to read every single line from a file and search for
a keyword such as si1_code , si2_code, si3_code.

below is a small sample of input file:

si1_code = 135'b110011;
si2_code = 2413'b11010010;
si3_code = 2513'b0010101101;


The only thing I would like to get from
si1_code is 110011
and si2_code is 11010010
 ....

My solution on this problem require many  steps as shown below:
while (<INFILE>) {
chomp;


     $_ =~ s/;//;  # get rid of the ;
     $_ =~ s/'b/ /;
     @line = split;

    if ($line[0] eq "s1_code") {

     "do something"

     }
  elsif ($line[0] eq "s2_code") {

     "do something"
    }
}


I really appreciate if you can give me a better solution.


Thanks in advance,




--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: 13 May 1999 11:32:37 GMT
From: "Merrill Lynch" <anybody@ml.com>
Subject: Re: pattern matching ?
Message-Id: <01be9d2f$9b32e420$a7bff3a9@zuriw14956>

@lines= ("si1_code = 135'b110011;\n","si2_code =
2413'b11010010;\n","si3_code = 2513'b0010101101;\n");
foreach(@lines)
{
    if(s/si1_code =.*'b(\d*)/$1/)
    {
	print "$_\n";  #should be the code.
    }
    elsif(s/si2_code =.*'b(\d*)/$1/)
    {
        #si2_code
    }
}


is that ok??

Dominic

Dominic Tootell
Merrill Lynch Derivative Products AG
Stauffacherstrasse 5
8004 Zurich
Switzerland
tootedom@exchange.ch.ml.com

tvn007@my-dejanews.com wrote in article <7he678$te6$1@nnrp1.deja.com>...
> Hi,
> 
> Would someone help me on this ?
> 
> Problem:
> 
> I have to read every single line from a file and search for
> a keyword such as si1_code , si2_code, si3_code.
> 
> below is a small sample of input file:
> 
> si1_code = 135'b110011;
> si2_code = 2413'b11010010;
> si3_code = 2513'b0010101101;
> 
> 
> The only thing I would like to get from
> si1_code is 110011
> and si2_code is 11010010
> ....
> 
> My solution on this problem require many  steps as shown below:
> while (<INFILE>) {
> chomp;
> 
> 
>      $_ =~ s/;//;  # get rid of the ;
>      $_ =~ s/'b/ /;
>      @line = split;
> 
>     if ($line[0] eq "s1_code") {
> 
>      "do something"
> 
>      }
>   elsif ($line[0] eq "s2_code") {
> 
>      "do something"
>     }
> }
> 
> 
> I really appreciate if you can give me a better solution.
> 
> 
> Thanks in advance,
> 
> 
> 
> 
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
> 


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

Date: Thu, 13 May 1999 03:27:12 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: pattern matching ?
Message-Id: <gsudh7.am.ln@magna.metronet.com>

tvn007@my-dejanews.com wrote:

: Problem:

: I have to read every single line from a file and search for
: a keyword such as si1_code , si2_code, si3_code.


: The only thing I would like to get from
: si1_code is 110011
: and si2_code is 11010010


--------------------
#!/usr/bin/perl -w
use strict;

my $re = join '|', qw( si1_code si2_code si3_code);

while (<DATA>) {
   print "$1 is $2\n" if /^($re)[^']*'b(.*?);$/o;
}

__DATA__
si1_code = 135'b110011;
si2_code = 2413'b11010010;
si3_code = 2513'b0010101101;
--------------------


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 13 May 1999 14:59:19 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: print to STDOUT and a file at the same time?
Message-Id: <7hepc7$816$2@info2.uah.edu>

In article <7hemej$8k1$1@nnrp1.deja.com>,
	bing-du@tamu.edu writes:
: How to use 'print' statement to output to STDOUT and a file at the SAME
: TIME?
: 
: print "hello world\n";  ---  STDOUT
: print FILE "hello world\n";  ---- FILE

    my $file = "filename";

    open  OUT, "| tee $file" or die "$0: failed fork: $!";
    print OUT  "Hello, world!\n";
    close OUT
        or warn $! ? "Error closing tee pipe: $!"
                   : "Exit status $? from tee";

Greg
-- 
Sam:  What do you say, Norm? 
Norm: Any cheap, tawdry thing that'll get me a beer.


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

Date: Thu, 13 May 1999 15:34:35 GMT
From: brian@llinderman.dental.nyu.edu (Brian Seitz)
Subject: Re-reading CGI form data. 
Message-Id: <fiC_2.21$qQ.375@typhoon.nyu.edu>

Does anyone know if it is possible to determine if the form data in a CGI
script has already been parsed based on the $ENV variables?  Something
definitely happens to the input stream after it is parsed, because if you try
to parse it again, the browser will hang, so I would think that there would be
someway to check for this, but $ENV{'CONTENT_LENGTH'} is still 15 after being
parsed.  I need to check for already parsed form data to avoid this hanging.
Thanks.

  


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

Date: Thu, 13 May 1999 03:00:49 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: REGULAR EXPRESSION problems
Message-Id: <1btdh7.am.ln@magna.metronet.com>

Ryan Ngi (ryanngi@hotmail.com) wrote:

: i have 1 questions about regular expression.

: 1. give  $Question='go to http://www.perl.com/CPAN/ you'll find it';
                     ^                                   ^          ^
                     ^                                   ^          ^
:    how can i change the $Question to
: 'go to <a href=http://www.perl.com/CPAN/>http://www.per.com/CPAN/</a>
: you'll find it';

: I've tried $Question=~s{(http://|ftp://)(\S+)}{<ahref=$1$2>$1$2</a>}i;
                                                  ^^^^^
                                                  ^^^^^ missing a space
: but it's not WORK!... what's wrong,..... how can i fix it!


   Works for me. (after fixing your syntax error. Please post only
                  your real code)

   You should put quotes around the href value.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 12 May 1999 12:53:48 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: send a PDF file
Message-Id: <37396bcc@newsread3.dircon.co.uk>

Kevin <mpajot@club-internet.fr> wrote:
> 
> Hi,
> 
> My goal is to send a PDF file to the client, I know the header
> "Content-type: application/pdf" but what do I have to do then ? (the
> navigator is supposed to ask the surfer if he wants to read the file or save
> it on the disk)
> 

These are the required steps :

  print header
  open file for reading
  binmode file
  binmode stdout
  print file contents to stdout
  close file

Your program might look like:

#!/usr/bin/perl -w

use CGI qw(:standard);

if(open(PDF,"myfile.pdf"))
  {
    print header('application/pdf');
    binmode(PDF);
    binmode(STDOUT);

    {local $/; print <PDF>}

    close PDF;
  }
else
  {
   print header('text/html');

   print "couldnt open file ....";
  }


> Other little question (I have no reference book on Perl)
> - How can I get the first or the third letter of a string $string
> - How can I get the date in my perl script under an Unix server (do I have
> to use "exec")
> - How can I generate random numbers
> 
All of these questions are answered in the documentation what comes with
Perl.  

If you are on a Unix system type:

man perl

if You are a PoB then type:

perldoc perl

If you dont have perl on your system then the documentation can be found
at  :

<http://language.perl.com/CPAN/doc/manual/html/index.html>

Questions that are answered in the documentation are generally frowned
upon here...


/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Thu, 13 May 1999 11:47:48 +0100
From: "J Webb" <csx1jw@ee.surrey.ac.uk>
Subject: Re: sendmail misbehaving
Message-Id: <7heamo$qha$1@news8.svr.pol.co.uk>

Actually I have done all those things and the pipe appears to be closing
correctly.  I set up a hotmail account and got the script to send to that
account, and it worked fine, so I have a feeling it is something to do with
one particular email account.  But the problem is, how can I be sure it's
not going to happen to other email accounts if I wanted to use the script to
send messages to other people?  I thought initially that the script was
completing before sendmail had a chance to finish its task, so I added a
time delay in by iterating a variable a few thousand times before closing
the pipe, but this made no difference. I think I will try it by adding the
message into the mail queue instead of sending immediately and see if that
makes a difference.

Thanks,

Jason

Andrzej Filip wrote in message <3739AFB0.EFFB00E1@bigfoot.com>...
>Greg Bacon wrote:
>
>> In article <3739A870.2AB45C95@bigfoot.com>,
>>         Andrzej Filip <anfi@bigfoot.com> writes:
>> : Do you explicitly close pipe to sendmail ?
>> : e.g.
>> :
>> : open(SENDMAIL,"|....") or die;
>> : # [...]
>> : close(SENDMAIL);
>>
>> Why are you checking open()'s return value but not close()'s?  Maybe
>> something like
>>
>>     close SENDMAIL
>>         or warn $! ? "Error closing sendmail pipe: $!"
>>                    : "Exit status $? from sendmail";
>>
>> as recommended in L<perlfunc/close>.
>
>You are right, close exit value should also be tested.
>
>The problem described seems to be caused by not flushing
>pipe buffers when script terminates.
>
>--
>Andrzej (Andrew) A. Filip
>http://www,bigfoot.com/~anfi
>Private: anfi@bigfoot.com   Business: sales@impaq.com.pl
>I NO LONGER USE anfi@polbox.com
>Posting history (all addresses):
>http://www.dejanews.com/profile.xp?author=Andrzej%20Filip&ST=PS
>
>




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

Date: Thu, 13 May 1999 12:24:31 GMT
From: waxpack@my-dejanews.com
Subject: Shopping Cart
Message-Id: <7heg9u$440$1@nnrp1.deja.com>

I am looking for a programmer to finish DcShop for use on my site.
DcShop is a shopping cart script made by DcScripts
(http://www.dcscripts.com), which I feel is the start of the best cart
script on the net.
Unfortunately the script won't be done by them for many months and I
would like it now.
Only thing that needs to be done, is the allowance of items to be added
by browser.
Currently you may only add items, through the cgi script itself.
If anyone would like to accept this job please contact me at
waxpack@waxpack.com.
This job pays $100 flat. $50 up front. $50 on completion.
David Choi of DcScripts will allow anyone to edit his script, so please
don't worry about that.

Let me know at the earliest convience.

Thank You

Sincerely,
Jared Landress
http://www.waxpack.com
Waxpack.Com


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---


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

Date: 12 May 1999 12:19:30 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: tcgrep not expanding command-line wildcards
Message-Id: <373963c2@newsread3.dircon.co.uk>

Eric Pement <epement@jpusa.chi.il.us> wrote:
> 
>    Yes, but there is such a thing as a "most likely" conjecture when
> installing software.
> 

<etc>

I'm sure p5p would be delighted to receive your patches ;-}

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Thu, 13 May 1999 10:39:08 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: Ten Tips toward *DIVERSITY COMPLIANCE* in Web Design
Message-Id: <slrn7jje1k.a13.sitaram@japh.unidata.com>

On Tue, 11 May 1999 11:49:55 -0700, Matt Kruse <mkruse@rens.com> wrote:

>>4) Make sure that you use nothing but standard HTML.  Never ever use
>>   MS-HTML -- ever.

>Again, I disagree. I recently wrote a system which required IE5 to 
>function correctly. I required all users to use IE5. Either they chose
>to comply and use the system, or they chose not to use the system. It's
>that simple. Again... generalizing way too much.

I hope that was on an intranet where you can actually force people
(you say "they chose", I say "you forced them") in such
directions.  If it was in the public-accessible web space - well
I'm trying to think of a polite word...still trying...giving up!

Sitaram "its nice to have a boss who doesnt care that I use Linux
all the time" Chamarty


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

Date: 13 May 99 11:50:08 GMT
From: yoda@dagoba.org (Jedi Master Yoda)
Subject: Threads: object method coderef syntax?
Message-Id: <slrn7jlhlm.66v.yoda@dagoba.org>

I have a $foo->bar() method call which I want to run as a Thread. Now
the Thread constructor takes a coderef, but I can't for the life of me
figure out the right syntax to get this. The obvious

$t = new Thread(\&foo->bar());

doesn't work (perl just replies 'Not a CODE reference' . I think I must
have tried every possible random combination of brackets, backslashes
and braces without much joy. Help please!

JMY


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

Date: Thu, 13 May 1999 11:40:18 +0200
From: "Jan-Friedrich Mutter" <jfm@bigfoot.de>
Subject: Re: translating FAT to VFAT
Message-Id: <7he6jr$qtl$1@union.informatik.uni-muenchen.de>

>> is there a module or method or code available which is able to
>translate,
>> say 'C:\Progra~1' to 'C:\Program Files' ?
>
>If there is, it'd probably be at http://www.perl.com/CPAN
>
>However, I'm not sure there would be... How come you're getting 16-bit
>pathnames anyway?

It is no Perl problem actually.
Well you asked, now take the consequences :-)
I have modified the registry so that I can start my xterm from the directory
by right clicking the directory and choosing "xterm here" from the context
menu. The registry keys are:
HKEY_CLASSES_ROOT\Directory\shell\Xterm here
HKEY_CLASSES_ROOT\Directory\shell\Xterm here\command
        (Standard) = perl xterm.pl %1

xterm.pl starts my xterm. The problem is that %1 only contains the old FAT
pathname...

Any (also no Perl related) solutions are appreciated.

Thanks for your effort.
-Jan.





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

Date: Thu, 13 May 1999 00:29:59 +0200
From: "Nokian" <106274.2233@compuserve.com>
Subject: vb2perl
Message-Id: <7he5e1$82k@selena.rz.uni-duesseldorf.de>

hi

 I need a program, which translates visual basic source code into perl
source
code.

 thanx!

 (ich suche ein Programm, welches mir visual basic sources code in perl
 |bersetzt.

 Danke)





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

Date: Wed, 12 May 1999 13:52:23 +0200
From: "Pavel Kotala" <pkotala@logis.cz>
Subject: Where is SMPT.pl ?
Message-Id: <926509941.984195@gate.logis.cz>

In which module can I find SMTP.pl? Exists prepared Win32 version?

Thank You

Pavel Kotala




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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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 5651
**************************************

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