[28317] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 9681 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 4 14:05:52 2006

Date: Mon, 4 Sep 2006 11:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 4 Sep 2006     Volume: 10 Number: 9681

Today's topics:
    Re: (Off topic) Cyberwar question <mgarrish@gmail.com>
    Re: CPAN - 'cl' is not recognized as an internal or ext <hjp-usenet2@hjp.at>
    Re: Cygwin error regarding profile.global anno4000@radom.zrz.tu-berlin.de
    Re: Cygwin error regarding profile.global beartiger@gmail.com
    Re: Cygwin error regarding profile.global <David.Squire@no.spam.from.here.au>
    Re: Cygwin error regarding profile.global <mgarrish@gmail.com>
    Re: Cygwin error regarding profile.global beartiger@gmail.com
    Re: Cygwin error regarding profile.global beartiger@gmail.com
    Re: Cygwin error regarding profile.global beartiger@gmail.com
    Re: Cygwin error regarding profile.global <jurgenex@hotmail.com>
    Re: imagemagick very slow - is there anything better? <paul.matthijsse@wanadoo.fr>
    Re: imagemagick very slow - is there anything better? <dontbother@nospam.com>
    Re: Insert Log file into oracle table <addinall@addinall.org>
    Re: Insert Log file into oracle table mattjones@hotmail.co.uk
    Re: Insert Log file into oracle table <tadmc@augustmail.com>
        Net::FTP - How Do I Read The Available Space On A Parti <mark1.thompson45@btinternet.com>
    Re: Net::FTP - How Do I Read The Available Space On A P <David.Squire@no.spam.from.here.au>
    Re: Net::FTP - How Do I Read The Available Space On A P <mritty@gmail.com>
    Re: Net::FTP - How Do I Read The Available Space On A P anno4000@radom.zrz.tu-berlin.de
    Re: Net::FTP - How Do I Read The Available Space On A P <mark1.thompson45@btinternet.com>
        Perl script not enterpreting images after moving site t <bmth581@aol.com>
    Re: Program that download ZIP file from web? <josef.moellers@fujitsu-siemens.com>
    Re: qr// doesn't handle m modifier? <mritty@gmail.com>
    Re: words selection <klaus03@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 4 Sep 2006 06:49:23 -0700
From: "Matt Garrish" <mgarrish@gmail.com>
Subject: Re: (Off topic) Cyberwar question
Message-Id: <1157377763.671327.265690@m79g2000cwm.googlegroups.com>


beartiger@gmail.com wrote:

> Tad McClellan wrote:
> > Skybuck <skybuck2000@hotmail.com> wrote:
> >
> >
> > > Subject: (Off topic) Cyberwar question
> >
> >
> > Making off topic posts is rude.
> >
> > Labelling an off topic post does not make it any less rude.
>
> Objecting to OT posts by replying to OT posts is stupid.
> 

Hmm, enlighten me as to how that does not apply to you?

Matt



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

Date: Mon, 4 Sep 2006 12:23:34 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: CPAN - 'cl' is not recognized as an internal or external command,
Message-Id: <slrnefnvlb.m3f.hjp-usenet2@yoyo.hjp.at>

On 2006-09-04 08:28, MoshiachNow <lev.weissman@creo.com> wrote:
> But why these errors pop up in the first place?

Because you tried to install modules (partially) written in C from
source code.

> Do I realy need have C++ compilers installed for this ?

No, you don't need a C++ compiler. C++ is  a different language than C.

You do need a C compiler if you want to compile modules written in C.

	hp


-- 
   _  | Peter J. Holzer    | > Wieso sollte man etwas erfinden was nicht
|_|_) | Sysadmin WSR       | > ist?
| |   | hjp@hjp.at         | Was sonst wäre der Sinn des Erfindens?
__/   | http://www.hjp.at/ |	-- P. Einstein u. V. Gringmuth in desd


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

Date: 4 Sep 2006 10:16:08 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Cygwin error regarding profile.global
Message-Id: <4m2cn8F45od5U2@news.dfncis.de>

 <beartiger@gmail.com> wrote in comp.lang.perl.misc:
> This post is simply to document the solution to a cygwin error so that
> those who have the same issue can find the solution when they do a
> Google Groups search.  Please do not flame me for posting this here.

What makes you immune?  Your posting is blatantly off topic.

Anno


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

Date: 4 Sep 2006 06:44:07 -0700
From: beartiger@gmail.com
Subject: Re: Cygwin error regarding profile.global
Message-Id: <1157377447.008913.150310@h48g2000cwc.googlegroups.com>

anno4000@radom.zrz.tu-berlin.de wrote:
> <beartiger@gmail.com> wrote in comp.lang.perl.misc:
> > This post is simply to document the solution to a cygwin error so that
> > those who have the same issue can find the solution when they do a
> > Google Groups search.  Please do not flame me for posting this here.
> 
> Wha<snip>

Moron.


J



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

Date: Mon, 04 Sep 2006 14:51:53 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: Cygwin error regarding profile.global
Message-Id: <edhb1p$psd$1@gemini.csx.cam.ac.uk>

beartiger@gmail.com wrote:
> anno4000@radom.zrz.tu-berlin.de wrote:
>> <beartiger@gmail.com> wrote in comp.lang.perl.misc:
>>> This post is simply to document the solution to a cygwin error so that
>>> those who have the same issue can find the solution when they do a
>>> Google Groups search.  Please do not flame me for posting this here.
>> Wha<snip>
> 
> Moron.

Tsk. Talking to yourself again.


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

Date: 4 Sep 2006 06:55:19 -0700
From: "Matt Garrish" <mgarrish@gmail.com>
Subject: Re: Cygwin error regarding profile.global
Message-Id: <1157378119.926499.174860@i3g2000cwc.googlegroups.com>


beartiger@gmail.com wrote:

> anno4000@radom.zrz.tu-berlin.de wrote:
> > <beartiger@gmail.com> wrote in comp.lang.perl.misc:
> > > This post is simply to document the solution to a cygwin error so that
> > > those who have the same issue can find the solution when they do a
> > > Google Groups search.  Please do not flame me for posting this here.
> >

> Moron.
>

You got the order of your response all wrong. The "moron" is you, or if
you disagree would you please care to explain why you posted such a
riculously off-topic message to a perl group? No one here cares about
your cygwin configuration problems, and no one searching for an answer
to the same problem is likely to search in comp.lang.perl.misc either.
Or did it make you feel like a big man to post to usenet?

Matt



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

Date: 4 Sep 2006 10:05:06 -0700
From: beartiger@gmail.com
Subject: Re: Cygwin error regarding profile.global
Message-Id: <1157389506.668259.201610@i42g2000cwa.googlegroups.com>

Matt Garrish wrote:
> beartiger@gmail.com wrote:
>
> > anno4000@radom.zrz.tu-berlin.de wrote:
> > > <beartiger@gmail.com> wrote in comp.lang.perl.misc:
> > > > This post is simply to document the solution to a cygwin error so that
> > > > those who have the same issue can find the solution when they do a
> > > > Google Groups search.  Please do not flame me for posting this here.
> > >
> 
> > Moron.
> >
> 
> You got the order of yo<snip>

Fuck you.


J



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

Date: 4 Sep 2006 10:08:24 -0700
From: beartiger@gmail.com
Subject: Re: Cygwin error regarding profile.global
Message-Id: <1157389704.573763.133670@m73g2000cwd.googlegroups.com>

Matt Garrish wrote:
> beartiger@gmail.com wrote:
>
> > anno4000@radom.zrz.tu-berlin.de wrote:
> > > <beartiger@gmail.com> wrote in comp.lang.perl.misc:
> > > > This post is simply to document the solution to a cygwin error so that
> > > > those who have the same issue can find the solution when they do a
> > > > Google Groups search.  Please do not flame me for posting this here.
> > >
>
> > Moron.
> >
>
> You got the order of your respon<snip>

Take a walk toward the closest shore and keep going until your hat
floats.


J



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

Date: 4 Sep 2006 10:12:24 -0700
From: beartiger@gmail.com
Subject: Re: Cygwin error regarding profile.global
Message-Id: <1157389943.956960.191740@e3g2000cwe.googlegroups.com>

David Squire wrote:
> beartiger@gmail.com wrote:
> > anno4000@radom.zrz.tu-berlin.de wrote:
> >> <beartiger@gmail.com> wrote in comp.lang.perl.misc:
> >>> This post is simply to document the solution to a cygwin error so that
> >>> those who have the same issue can find the solution when they do a
> >>> Google Groups search.  Please do not flame me for posting this here.
> >> Wha<snip>
> >
> > Moron.
>
> Tsk. T<snip>

You post OT because you hate it when people post OT.  You could have
let this thread drop off the current list.  But no, you perpetuated it.
 You and your ilk are properly described as morons.   


J



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

Date: Mon, 04 Sep 2006 17:44:13 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Cygwin error regarding profile.global
Message-Id: <NBZKg.1597$YZ3.1118@trnddc03>

beartiger@gmail.com wrote:
> Matt Garrish wrote:
>> beartiger@gmail.com wrote:
>>
>>> anno4000@radom.zrz.tu-berlin.de wrote:
>>>> <beartiger@gmail.com> wrote in comp.lang.perl.misc:
>>>>> This post is simply to document the solution to a cygwin error so
>>>>> that those who have the same issue can find the solution when
>>>>> they do a Google Groups search.  Please do not flame me for
>>>>> posting this here.
>>>>
>>
>>> Moron.
>>>
>>
>> You got the order of yo<snip>
>
> Fuck you.

***PLONK*** 




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

Date: Mon, 04 Sep 2006 16:01:06 +0200
From: Paul Matthijsse <paul.matthijsse@wanadoo.fr>
Subject: Re: imagemagick very slow - is there anything better?
Message-Id: <44fc31a0$0$5080$ba4acef3@news.orange.fr>

Kees wrote:
<cut>
> I have used Image/Perl-Magick for various projects. Even doing complex 
> online transformations of large uploaded pictures I found it to be quite 
> fast.

Quite fast? When I open a 2048x1536 jpg file (from 3 mp camera, file 
compressed to ~ 1 MB) and say

$image->Sharpen(15);

it takes 30 seconds to do that (on an Athlon64 3400+).

$image->Sharpen(25); takes even 1m22s. Problem is that even this level 
of sharpening isn't enough for my photos, I guess that I need at least 
values around 50, and that takes again more time, way too much actually.

So with what kind of transformations is ImageMagick 'quite fast'?

Cheers, Paul.


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

Date: Mon, 04 Sep 2006 15:57:20 +0100
From: W Marsh <dontbother@nospam.com>
Subject: Re: imagemagick very slow - is there anything better?
Message-Id: <44fc3ec5$0$2504$db0fefd9@news.zen.co.uk>

Paul Matthijsse wrote:
> Kees wrote:
> <cut>
>> I have used Image/Perl-Magick for various projects. Even doing complex 
>> online transformations of large uploaded pictures I found it to be 
>> quite fast.
> 
> Quite fast? When I open a 2048x1536 jpg file (from 3 mp camera, file 
> compressed to ~ 1 MB) and say
> 
> $image->Sharpen(15);
> 
> it takes 30 seconds to do that (on an Athlon64 3400+).
> 
> $image->Sharpen(25); takes even 1m22s. Problem is that even this level 
> of sharpening isn't enough for my photos, I guess that I need at least 
> values around 50, and that takes again more time, way too much actually.
> 
> So with what kind of transformations is ImageMagick 'quite fast'?
> 
> Cheers, Paul.

I don't think you understand the details of the operation you're asking 
ImageMagick to perform well enough to comment on speed issues. Are you 
aware of what the filter you're applying is actually doing?

It has very little to do with the compression of the JPEG (although 
naturally the decompression time will have to be taken into account, 
although I imagine that this is negligible). You're applying a filter to 
each and every pixel in that image. That's what you're asking 
ImageMagick to do, and it's certainly doing that at a happy rate. It's a 
large DSP operation on a massive data set.

If you don't want it to do this, stop asking it to.


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

Date: 4 Sep 2006 05:02:13 -0700
From: "addinall" <addinall@addinall.org>
Subject: Re: Insert Log file into oracle table
Message-Id: <1157371333.339177.235280@h48g2000cwc.googlegroups.com>


mattjones@hotmail.co.uk wrote:
> hi,
>
> Im having trouble loading a .log file into oracle. I can connect to the
> database and i can insert data (that i define in an INSERT statement).
> I eventually need to filter specific info from the .log files (there
> are alot of them - and this script provides an automated process) but
> for now i just want to read the whole script into a table!
>
> CURRENT SCRIPT:
> #!/usr/central/bin/perl -w
>
> use strict;
> use DBI;
>
> my $dbh = DBI ->connect("dbi:Oracle:SERVER", "DATABASE", "PASSWORD")
>         or die "Couldn't connect to database: $DBI::errstr\n";
>
>
> my $rows = $dbh->do("
> INSERT INTO LOGS VALUES ('160820061-fst.log', '5', '0', 'FASTSEARCH',
> '0', 'inversions', '0', 'conflicting')     ");
>
> $dbh->disconnect;
>
> exit;
> ##### I have also tried the following and putting $LOG into one of the
> values but I just get the value '1' returned!
> my $LOG = open (LOG, "/home/USRNAME/PERL/hello.log");
>
> my @data = <LOG>;
> close LOG;
>
> Any ideas?

I'm assuming you have a CLOB field to put the data into?
If so, your second attempt is the one that is correct.
If ORACLE is returning a '1', that generally reads
"One row updated".

Fire up SQL+, or a PL/SQL session, or TOAD and do a

DESCRIBE TABLE_NAME ;

and let us know what is in the table.  Then perhaps do a

SELECT COUNT(*) FROM TABLE_NAME ;

to see if any of your attempts have made it into the
database.

I assume that some of your entries are just going to contain strings
like:
'160820061-fst.log'

ORACLE isn't hard, be persitant, it will become clear!

Cheers,
Mark Addinall.



> 
> Thanks



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

Date: 4 Sep 2006 05:37:00 -0700
From: mattjones@hotmail.co.uk
Subject: Re: Insert Log file into oracle table
Message-Id: <1157373420.420892.144030@b28g2000cwb.googlegroups.com>


addinall schrieb:

> mattjones@hotmail.co.uk wrote:
> > hi,
> >
> > Im having trouble loading a .log file into oracle. I can connect to the
> > database and i can insert data (that i define in an INSERT statement).
> > I eventually need to filter specific info from the .log files (there
> > are alot of them - and this script provides an automated process) but
> > for now i just want to read the whole script into a table!
> >
> > CURRENT SCRIPT:
> > #!/usr/central/bin/perl -w
> >
> > use strict;
> > use DBI;
> >
> > my $dbh = DBI ->connect("dbi:Oracle:SERVER", "DATABASE", "PASSWORD")
> >         or die "Couldn't connect to database: $DBI::errstr\n";
> >
> >
> > my $rows = $dbh->do("
> > INSERT INTO LOGS VALUES ('160820061-fst.log', '5', '0', 'FASTSEARCH',
> > '0', 'inversions', '0', 'conflicting')     ");
> >
> > $dbh->disconnect;
> >
> > exit;
> > ##### I have also tried the following and putting $LOG into one of the
> > values but I just get the value '1' returned!
> > my $LOG = open (LOG, "/home/USRNAME/PERL/hello.log");
> >
> > my @data = <LOG>;
> > close LOG;
> >
> > Any ideas?
>
> I'm assuming you have a CLOB field to put the data into?
> If so, your second attempt is the one that is correct.
> If ORACLE is returning a '1', that generally reads
> "One row updated".
>
> Fire up SQL+, or a PL/SQL session, or TOAD and do a
>
> DESCRIBE TABLE_NAME ;
>
> and let us know what is in the table.  Then perhaps do a
>
> SELECT COUNT(*) FROM TABLE_NAME ;
>
> to see if any of your attempts have made it into the
> database.
>
> I assume that some of your entries are just going to contain strings
> like:
> '160820061-fst.log'
>
> ORACLE isn't hard, be persitant, it will become clear!
>
> Cheers,
> Mark Addinall.
>
> Right, so I've created a CLOB field (didn't realise!) and my code is now:

#!/usr/central/bin/perl -w

use strict;
use DBI;

#!/usr/central/bin/perl -w

use strict;
use DBI;

my $dbh = DBI ->connect("dbi:Oracle:SERVER", "DATABASE", "PASSWORD")
        or die "Couldn't connect to database: $DBI::errstr\n";

my $LOG = open (LOG, "/home/USERNAME/PERL/hello.log");

my @data = <LOG>;
close LOG;

my $rows = $dbh->do("
INSERT INTO LOGS VALUES ( 'wesdf', 'sdfg', 'dfg', 'fdg', 'dfg', 'dfg',
'dfg', 'dfg', $LOG)      ");

$dbh->disconnect;

exit;
>
> > The 9th value to be inserted '$LOG' is supposed to read in hello.log. But i am still getting the value 1. Im using TOAD so can check it straight away by refreshing the schema browser.

I want to get this working before I think about what i have to enter
into the fields. But for your info: i have to search through 1 log file
at a time and pull out specific information (which are not delimited!).
Some of the lines are repetitious so i can't just define a value to
pull out. I have written some code on this and it basically pulls out
the lines i want - I was hoping that TOAD would let me then, filter out
the info on display!

> > Thanks for your help.....ive been working on this script for a while so this was my last resort - I was just given this to do and I hadn't even used oracle or written any PERL before!!!

Matt



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

Date: Mon, 4 Sep 2006 10:05:25 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Insert Log file into oracle table
Message-Id: <slrnefog5l.9i9.tadmc@magna.augustmail.com>

mattjones@hotmail.co.uk <mattjones@hotmail.co.uk> wrote:

> my $LOG = open (LOG, "/home/USRNAME/PERL/hello.log");


> Any ideas? 


You should always, yes _always_, check the return value from open():

   open (LOG, "/home/USRNAME/PERL/hello.log") or
      die "could not open '/home/USRNAME/PERL/hello.log'  $!";


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 4 Sep 2006 04:24:00 -0700
From: "tommo_blade" <mark1.thompson45@btinternet.com>
Subject: Net::FTP - How Do I Read The Available Space On A Partition ???
Message-Id: <1157369040.538376.110550@m79g2000cwm.googlegroups.com>

Hello All,
              I have read thru the perl docs for this module and I have
tried a few of the 'methods' available but as yet I have not been able
to get my script to pull the data I need from the server. basically I
want to know if there is enough 'available space' on a unix partition
prior to me FTP'ing a file to that host/partition, I have tried the
'ls' and 'dir' methods but I cannot get what I need. The data I need at
unix level can be gained by running a 'df -k' command which when run
returns the available disk space in the 'avail' column.

Does anyone know of any neat tricks to get this data.


cheers, Mark.



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

Date: Mon, 04 Sep 2006 12:52:13 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: Net::FTP - How Do I Read The Available Space On A Partition ???
Message-Id: <edh41e$b3q$1@gemini.csx.cam.ac.uk>

tommo_blade wrote:
> Hello All,
>               I have read thru the perl docs for this module and I have
> tried a few of the 'methods' available but as yet I have not been able
> to get my script to pull the data I need from the server. basically I
> want to know if there is enough 'available space' on a unix partition
> prior to me FTP'ing a file to that host/partition, I have tried the
> 'ls' and 'dir' methods but I cannot get what I need. The data I need at
> unix level can be gained by running a 'df -k' command which when run
> returns the available disk space in the 'avail' column.
> 
> Does anyone know of any neat tricks to get this data.

This works:

----

#!/usr/bin/perl

use strict;
use warnings;

my $df_out = `df -k`;

foreach my $Line (split /\n/, $df_out) {
	my ($Filesystem, $OneKBlocks, $Used, $Available, $UsePercent, 
$MountPoint) = split /\s+/, $Line, 6;
	print $Available if ($MountPoint eq '/'); # substitute whatever 
criteria you are interested in
}

----

but I am sure that someone will come up with a nifty one-liner. Also, it 
depends on your 'df' output having the same format as mine (tested on 
Ubuntu and Mac OS X).


DS


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

Date: 4 Sep 2006 05:35:42 -0700
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Net::FTP - How Do I Read The Available Space On A Partition ???
Message-Id: <1157373342.815362.172490@m79g2000cwm.googlegroups.com>

tommo_blade wrote:
>               I have read thru the perl docs for this module and I have
> tried a few of the 'methods' available but as yet I have not been able
> to get my script to pull the data I need from the server. basically I
> want to know if there is enough 'available space' on a unix partition
> prior to me FTP'ing a file to that host/partition, I have tried the
> 'ls' and 'dir' methods but I cannot get what I need. The data I need at
> unix level can be gained by running a 'df -k' command which when run
> returns the available disk space in the 'avail' column.
>
> Does anyone know of any neat tricks to get this data.

Uh.  Is this something you can do through FTP?  Forget Perl for a
moment - can you do this with a normal ftp command line session?   If
not, what makes you think you'd be able to do it with a Perl interphase
to the File Transfer Proticol?

Paul Lalli



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

Date: 4 Sep 2006 13:30:21 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Net::FTP - How Do I Read The Available Space On A Partition ???
Message-Id: <4m2o3dF4462sU1@news.dfncis.de>

David Squire  <David.Squire@no.spam.from.here.au> wrote in comp.lang.perl.misc:
> tommo_blade wrote:
> > Hello All,
> >               I have read thru the perl docs for this module and I have
> > tried a few of the 'methods' available but as yet I have not been able
> > to get my script to pull the data I need from the server. basically I
> > want to know if there is enough 'available space' on a unix partition
> > prior to me FTP'ing a file to that host/partition, I have tried the
> > 'ls' and 'dir' methods but I cannot get what I need. The data I need at
> > unix level can be gained by running a 'df -k' command which when run
> > returns the available disk space in the 'avail' column.
> > 
> > Does anyone know of any neat tricks to get this data.
> 
> This works:
> 
> ----
> 
> #!/usr/bin/perl
> 
> use strict;
> use warnings;
> 
> my $df_out = `df -k`;
> 
> foreach my $Line (split /\n/, $df_out) {
> 	my ($Filesystem, $OneKBlocks, $Used, $Available, $UsePercent, 
> $MountPoint) = split /\s+/, $Line, 6;
> 	print $Available if ($MountPoint eq '/'); # substitute whatever 
> criteria you are interested in
> }

According to the OPs words "want to know if there is enough 'available
space' ... prior to me FTP'ing a file to that host/partition" that would
have to be run on the remote system, through ssh perhaps.

No solution exists using only the FTP protocol.  The designers of FTP
have wisely decided not to require that.  At the time, there were
machines that measured disk space in odd-sized "words" or "pages".
How many bytes are 1000 36-bit words?

Not that any of this has a relation to Perl...

Anno


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

Date: 4 Sep 2006 10:54:45 -0700
From: "tommo_blade" <mark1.thompson45@btinternet.com>
Subject: Re: Net::FTP - How Do I Read The Available Space On A Partition ???
Message-Id: <1157392485.598378.252890@p79g2000cwp.googlegroups.com>

To clarify, I need to get this data using the Net::FTP module and not
by some preliminary perl script as has been mentioned in this thread.
Does anyone know if there are any other add-on modules to the Net::FTP
module that could get this data, i.e. Net::FTP::Common etc,  etc.

cheers, Mark.



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

Date: Mon, 04 Sep 2006 18:18:05 +0100
From: C Drake  <bmth581@aol.com>
Subject: Perl script not enterpreting images after moving site to different host
Message-Id: <ufnof21lp7qgq87mugi28rrqm4sdkb2q9g@4ax.com>


Hi, I have this shopping cart script which was woking fine on one
server (hosted at Spenix.com). When I moved the website to another
host's server (at Forgednetworks.com) the script works ok, except that
none of my images show up in the html pages it creates. I have checked
that all the file and folder permissions are set the same as before
and I have not altered the script. And yes, I transferred the image
files in binary. The images are located in the same directory as the
script (a subdirectory of the cgi-bin).

Can anyone suggest why this might be? Could it be something to do with
different Perl versions of different OS used on the hosting server?

I think I encountered this problem once before, but I can't remember
how it was resolved.

Thank you,
C Drake


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

Date: Mon, 04 Sep 2006 12:41:41 +0200
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: Program that download ZIP file from web?
Message-Id: <edh02k$oqr$1@nntp.fujitsu-siemens.com>

maran@homewares.ro wrote:
> I make program that download ZIP file from web.
> Why downloaded file isn't ZIP file?
> Why file has different size?
> If I make download from IE I downloaded file is ZIP file?
>=20
> IE-downloaded file size is     495.306 bites long.
> Perl-downloaded file size is   497.098 bites long.
>=20
> Please help me.
>=20
> Thanks.
>=20
>=20
>=20
> Perl program
> --------------------------
>=20
> # c:\perl\bin\perl.exe
> #
> #
>=20
> use warnings;
> use strict;
> use WWW::Mechanize;
>=20
> use CGI;
> my $cgi =3D CGI->new();
> my $form =3D $cgi->Vars;
> my $agent =3D WWW::Mechanize->new();
>=20
> $agent->get('http://www.ve-mil.hr/korisnici/Login.aspx');
> $agent->form_number('1');
> $agent->field('EmailTextBox','user22');
> $agent->field('LozinkaTextBox','********');
> $agent->submit();
> $agent->get('http://www.ve-mil.hr/download.aspx?Item=3DCjenik_Zip');
> open (FF, ">Cjenik.zip");
> print FF $agent->content();

How do you know whether the get() succeeded?
What does $agent->success() return?
What _is_ in the ZIP file?

--=20
Josef M=F6llers (Pinguinpfleger bei FSC)
	If failure had no penalty success would not be a prize
						-- T.  Pratchett



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

Date: 4 Sep 2006 04:19:33 -0700
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: qr// doesn't handle m modifier?
Message-Id: <1157368773.600377.231920@m73g2000cwd.googlegroups.com>

anno4000@radom.zrz.tu-berlin.de wrote:
> <xhoster@gmail.com> wrote in comp.lang.perl.misc:
> > Michele Dondi <bik.mido@tiscalinet.it> wrote:
> > > On 1 Sep 2006 10:57:38 -0700, adam@irvine.com wrote:
> > >
> > > >The following program doesn't do what I expected.  The second and third
> > > >"print" statements print, but the first one doesn't.  It looks as
> > > >though when the match operator uses a regular expression constructed
> > > >with qr//, the "m" modified that should have been stored in the regular
> > > >expression is ignored.  Did I do something wrong, or is this a bug in
> >
> > I get the same behavior as you do, using 5.8.8.
>
> Strange.  I see the problem with 5.6.1 but not with 5.8.8 (nor with
> bleadperl 5.9.4).

Also confirmed in 5.8.5 solaris...

Paul Lalli



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

Date: 4 Sep 2006 10:33:54 -0700
From: "Klaus" <klaus03@gmail.com>
Subject: Re: words selection
Message-Id: <1157391234.276026.299930@m73g2000cwd.googlegroups.com>

Truty wrote:
> Hi,
>
> Please help me,
> I would like to realise a filtre to select only word in file with
> caracteres include into this variable $carac_available;
> but not caracteres include into this variable $carac_notavailable;
>
> my name file is "dico.txt"
>
> sample with $carac_available = 'eo'; and $carac_notavailable =
> 'hydngp';
> word selected : close, mouve, ... because 'o' and 'e' is include into
> this words and 'h', 'y', 'd', 'n', 'g', 'p' is not include into this
> words.
>
> content dico.txt :
> doing
> close
> sunny
> drugs
> mouve
> ...
>
>
> my code with problem :
> open (FILE_ANSWER,"dico.txt.txt");
> while ($ligne = <FILE_ANSWER>) {
> 	chomp($ligne);
> 	if (($ligne =~ \[$carac_available]\) && ($ligne !~
> \[$carac_notavailable]\) ) { print $ligne." | "; }
> 	}
> 	close FILE_ANSWER;

Here is a program:
====================================
use strict;
use warnings;

my $carac_available    = 'eo';
my $carac_notavailable = 'hydngp';

open my $FILE_ANSWER, '<', 'dico.txt' or die "Error <dico.txt ($!)";

while (my $ligne = <$FILE_ANSWER>) {
    chomp($ligne);
    if ($ligne =~ /[\Q$carac_available\E]/
    and $ligne !~ /[\Q$carac_notavailable\E]/) {
        print $ligne, ' | ';
    }
}

close $FILE_ANSWER;
====================================

here is the content of 'dico.txt':
====================================
doing
close
sunny
drugs
mouve
====================================


and here is the ouput:
====================================
close | mouve | 
====================================



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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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


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