[30929] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2174 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jan 31 03:09:44 2009

Date: Sat, 31 Jan 2009 00:09:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 31 Jan 2009     Volume: 11 Number: 2174

Today's topics:
    Re: Constructing a scalar reference <uri@stemsystems.com>
    Re: Constructing a scalar reference <Steve.Roscio@hp.com>
    Re: Function Application is not Currying <jurgenex@hotmail.com>
    Re: Mathematica 7 compares to other languages <w_a_x_man@yahoo.com>
        new CPAN modules on Sat Jan 31 2009 (Randal Schwartz)
    Re: Perl Peeves <jjcassidy@gmail.com>
    Re: Perl Peeves <jjcassidy@gmail.com>
    Re: Perl Peeves <uri@stemsystems.com>
    Re: Perl Peeves (Tim McDaniel)
    Re: Perl Peeves <hjp-usenet2@hjp.at>
    Re: perl qt with cygwin? <xemoth@gmail.com>
    Re: perl qt with cygwin? <rabbits77@my-deja.com>
    Re: Text Print Entire Directory Tree including File Nam <fiazidris@gmail.com>
    Re: Text Print Entire Directory Tree including File Nam <fiazidris@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 30 Jan 2009 18:31:07 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Constructing a scalar reference
Message-Id: <x7myd8tlqc.fsf@mail.sysarch.com>

>>>>> "CB" == Chet Butcher <invalid@invalid.invalid> writes:

  CB> In the following sequence

  CB> $r = {}; # a hashref
  CB> $r = []; # an arrayref
  CB> $r = ?; # a scalar ref

  CB> What is ? ? I want to pass a ref to a scalar (pass by reference)
  CB> without resorting to

there is no special syntax to get a scalar ref like with hashes and arrays.

  CB>   my $r;
  CB>   mySub( \$r );

a do block works fine too:

	my $r = do{ \my $r } ;

  CB> I know it's not a big drama on the surface, but I'm trying to overload
  CB> the method to return various results depending on the reference type,
  CB> and I dont want the \ in some calls and not others. 

you need the \ somewhere to generate a scalar ref. and like with arrays
and hashes you can get them in loops and subs without the do block:

<untested pseudo code>

while( 1 ) 

	my $foo = get_stuff() ;
	push @foos, \$foo ;
}

perl will allocate a fresh scalar so you get a fresh scalar ref each
iteration. this is like:

while( 1 ) 

	my @bar = get_list() ;
	my %baz = get_hash() ;

	
	push @stuff, { bar => \@bar, baz => \%baz } ;
}

you get new arrays and hashes each iteration because a ref to the old
value is still around (inside @stuff's hashes).

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Fri, 30 Jan 2009 18:04:29 -0700
From: Steve Roscio <Steve.Roscio@hp.com>
Subject: Re: Constructing a scalar reference
Message-Id: <gm082t$tn3$1@usenet01.boi.hp.com>

There's not a special syntax for scalar refs, as there is for array refs
and hash refs.  You can do this:

	my $r = \"abc";
	my $r = \undef;

etc...


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

Date: Fri, 30 Jan 2009 16:01:50 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Function Application is not Currying
Message-Id: <a557o4lrjtaua10d7lsblvcpn6pdb2t4d5@4ax.com>

Jon Harrop <jon@ffconsultancy.com> wrote:
>I had hoped someone else would correct you but they haven't. So...

That is because ...

>Xah Lee wrote:

 ... everyone with more than 5 cents of brain has killfiled him a long
time ago.

jue


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

Date: 31 Jan 2009 05:32:31 GMT
From: "William James" <w_a_x_man@yahoo.com>
Subject: Re: Mathematica 7 compares to other languages
Message-Id: <gm0npf014o7@enews4.newsguy.com>

w_a_x_man@yahoo.com wrote:

> On Dec 25, 5:24 am, Xah Lee <xah...@gmail.com> wrote:
> 
> > The JavaScript example:
> > 
> > // Javascript. By William James
> > function normalize( vec ) {
> > var div=Math.sqrt(vec.map(function(x) x*x).reduce(function(a,b)
> > a+b))   return vec.map(function(x) x/div)
> > 
> > }
> > 
> > is also not qualified. (it is syntax error in SpiderMonkey engine
> > “JavaScript-C 1.7.0 2007-10-03”)
> 
> Since you are using the latest version of Mathematica, you should
> also use the latest version of SpiderMonkey.
> 
> The function works outside of a web browser with jslibs, and it
> works in Firefox 3.0.1.
> 
> <html>
> <body>
> 
> <script type="application/javascript;version=1.8"/>
> 
> // Tested with Firefox 3.0.1.
> // SpiderMonkey JavaScript 1.6 added map().
> // 1.8 added reduce() and function shorthand:
> // function(x) { return x * x }
> //   can now be:
> // function(x) x * x
> 
> // Javascript. By William James
> function normalize( vec ) {
> var div=Math.sqrt(vec.map(function(x) x*x).reduce(function(a,b) a+b))
>   return vec.map(function(x) x/div)
> }
> 
> window.alert( normalize( [2,3,4] ).toSource() )
> 
> </script>
> 
> </body>
> </html>

Reduce:

procedure normalize vec;
  begin scalar div;
    div := for each u in vec sum u^2;
    return map(~x/div, vec)
  end;



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

Date: Sat, 31 Jan 2009 05:42:27 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Sat Jan 31 2009
Message-Id: <KEBMIr.21Bw@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Apache2-ASP-2.18
http://search.cpan.org/~johnd/Apache2-ASP-2.18/
ASP for Perl, reloaded. 
----
Apache2-ASP-2.19
http://search.cpan.org/~johnd/Apache2-ASP-2.19/
ASP for Perl, reloaded. 
----
Apache2-Pod-0.25
http://search.cpan.org/~markle/Apache2-Pod-0.25/
base class for converting Pod files to prettier forms 
----
App-Sequence-0.0202
http://search.cpan.org/~kimoto/App-Sequence-0.0202/
pluggable subroutine engine. 
----
Bundle-CertHost-0.01
http://search.cpan.org/~cosmicnet/Bundle-CertHost-0.01/
A bundle to install PerlCertifiedHosting.com module requirements 
----
CGI-IDS-1.0108
http://search.cpan.org/~hinnerk/CGI-IDS-1.0108/
PerlIDS - Perl Website Intrusion Detection System (XSS, CSRF, SQLI, LFI etc.) 
----
CPAN-Testers-WWW-Statistics-0.59
http://search.cpan.org/~barbie/CPAN-Testers-WWW-Statistics-0.59/
CPAN Testers Statistics website. 
----
Catalyst-Model-MenuGrinder-0.01_01
http://search.cpan.org/~hbslabs/Catalyst-Model-MenuGrinder-0.01_01/
Catalyst Model base class for WWW::MenuGrinder 
----
Catalyst-Plugin-AuthenCookie-0.03
http://search.cpan.org/~drolsky/Catalyst-Plugin-AuthenCookie-0.03/
Plugin for cookie-based authentication 
----
Catalyst-View-Component-SubInclude-0.01
http://search.cpan.org/~nilsonsfj/Catalyst-View-Component-SubInclude-0.01/
Use subincludes in your Catalyst views 
----
Class-Attribute-0.023
http://search.cpan.org/~deepfryed/Class-Attribute-0.023/
Another way to define class attributes!!! 
----
Email-MIME-1.863
http://search.cpan.org/~rjbs/Email-MIME-1.863/
Easy MIME message parsing. 
----
File-Stat-Moose-0.06
http://search.cpan.org/~dexter/File-Stat-Moose-0.06/
Status info for a file - Moose-based 
----
Filesys-Virtual-Async-0.02
http://search.cpan.org/~xantus/Filesys-Virtual-Async-0.02/
Base class for non blocking virtual filesystems 
----
Filesys-Virtual-Async-Plain-0.02
http://search.cpan.org/~xantus/Filesys-Virtual-Async-Plain-0.02/
A plain non-blocking virtual filesystem 
----
Finance-Bank-IE-PermanentTSB-0.2
http://search.cpan.org/~pallotron/Finance-Bank-IE-PermanentTSB-0.2/
Perl Interface to the PermanentTSB Open24 homebanking on <http://www.open24.ie> 
----
Finance-Bank-IE-PermanentTSB-0.2-release
http://search.cpan.org/~pallotron/Finance-Bank-IE-PermanentTSB-0.2-release/
Perl Interface to the PermanentTSB Open24 homebanking on <http://www.open24.ie> 
----
Finance-Bank-IE-PermanentTSB-0.2.1
http://search.cpan.org/~pallotron/Finance-Bank-IE-PermanentTSB-0.2.1/
Perl Interface to the PermanentTSB Open24 homebanking on <http://www.open24.ie> 
----
Finance-Bank-IE-PermanentTSB-0.2.2
http://search.cpan.org/~pallotron/Finance-Bank-IE-PermanentTSB-0.2.2/
Perl Interface to the PermanentTSB Open24 homebanking on <http://www.open24.ie> 
----
Flickr-Embed-0.01
http://search.cpan.org/~marnanel/Flickr-Embed-0.01/
Simple embedding of Flickr pictures into HTML 
----
Games-Framework-RCP-0.02_02
http://search.cpan.org/~wolfman/Games-Framework-RCP-0.02_02/
Generic video game tactics based battle system. 
----
HTML-TreeBuilderX-ASP_NET-0.08
http://search.cpan.org/~ecarroll/HTML-TreeBuilderX-ASP_NET-0.08/
Scrape ASP.NET/VB.NET sites which utilize Javascript POST-backs. 
----
IMDB-Film-0.36
http://search.cpan.org/~stepanov/IMDB-Film-0.36/
OO Perl interface to the movies database IMDB. 
----
IO-Lambda-1.07
http://search.cpan.org/~karasik/IO-Lambda-1.07/
non-blocking I/O as lambda calculus 
----
IO-Moose-0.07
http://search.cpan.org/~dexter/IO-Moose-0.07/
Reimplementation of IO::* with improvements 
----
LaTeX-Table-0.9.12
http://search.cpan.org/~limaone/LaTeX-Table-0.9.12/
Perl extension for the automatic generation of LaTeX tables. 
----
Lingua-PT-Conjugate-1.16
http://search.cpan.org/~egross/Lingua-PT-Conjugate-1.16/
----
Linux-DVB-DVBT-0.03
http://search.cpan.org/~sdprice/Linux-DVB-DVBT-0.03/
Perl extension for DVB terrestrial recording, epg, and scanning 
----
Mail-Action-0.45
http://search.cpan.org/~chromatic/Mail-Action-0.45/
base for building modules that act on incoming mail 
----
Mail-Action-0.46
http://search.cpan.org/~chromatic/Mail-Action-0.46/
base for building modules that act on incoming mail 
----
Mail-TempAddress-0.62
http://search.cpan.org/~chromatic/Mail-TempAddress-0.62/
module for managing simple, temporary mailing addresses 
----
MojoMojo-0.999027
http://search.cpan.org/~mramberg/MojoMojo-0.999027/
A Catalyst & DBIx::Class powered Wiki. 
----
Net-Whois-Raw-1.61
http://search.cpan.org/~despair/Net-Whois-Raw-1.61/
Get Whois information for domains 
----
PHP-Session-0.27
http://search.cpan.org/~miyagawa/PHP-Session-0.27/
read / write PHP session files 
----
POE-Test-Loops-1.003
http://search.cpan.org/~rcaputo/POE-Test-Loops-1.003/
Reusable tests for POE::Loop authors 
----
Params-Util-0.36
http://search.cpan.org/~adamk/Params-Util-0.36/
Simple, compact and correct param-checking functions 
----
Pod-Weaver-2.001
http://search.cpan.org/~rjbs/Pod-Weaver-2.001/
do horrible things to POD, producing better docs 
----
Provision-Unix-0.41
http://search.cpan.org/~msimerson/Provision-Unix-0.41/
provision accounts on unix systems 
----
Roguelike-Utils-0.4.236
http://search.cpan.org/~earonesty/Roguelike-Utils-0.4.236/
----
Roguelike-Utils-0.4.237
http://search.cpan.org/~earonesty/Roguelike-Utils-0.4.237/
----
Roguelike-Utils-0.4.242
http://search.cpan.org/~earonesty/Roguelike-Utils-0.4.242/
----
String-Glob-Permute-0.01
http://search.cpan.org/~mschilli/String-Glob-Permute-0.01/
Expand {foo,bar,baz}[2-4] style string globs 
----
Syntax-Highlight-Perl6-0.039
http://search.cpan.org/~azawawi/Syntax-Highlight-Perl6-0.039/
Perl 6 Syntax Highlighter 
----
Sys-Sendfile-0.07
http://search.cpan.org/~leont/Sys-Sendfile-0.07/
Zero-copy data transfer 
----
SysTray-0.13
http://search.cpan.org/~cdrake/SysTray-0.13/
Perl extension for cross-platform systray support 
----
Term-Emit-Format-HTML-0.0.1
http://search.cpan.org/~roscio/Term-Emit-Format-HTML-0.0.1/
Formats Term::Emit output into HTML 
----
Tie-Cycle-1.17
http://search.cpan.org/~bdfoy/Tie-Cycle-1.17/
Cycle through a list of values via a scalar. 
----
Tkx-1.07
http://search.cpan.org/~gaas/Tkx-1.07/
Yet another Tk interface 
----
Vim-Snippet-Converter-0.06
http://search.cpan.org/~cornelius/Vim-Snippet-Converter-0.06/
A Template Converter for Slippery Snippet Vim Plugin 
----
WWW-MenuGrinder-0.01_01
http://search.cpan.org/~hbslabs/WWW-MenuGrinder-0.01_01/
A tool for managing dynamic website menus - base class. 
----
WebService-Simple-0.14
http://search.cpan.org/~yusukebe/WebService-Simple-0.14/
Simple Interface To Web Services APIs 


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


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

Date: Fri, 30 Jan 2009 15:12:44 -0800 (PST)
From: A Dude <jjcassidy@gmail.com>
Subject: Re: Perl Peeves
Message-Id: <729125d9-9196-4c5d-9607-d90fb216cbf9@v18g2000pro.googlegroups.com>

On Jan 28, 6:12=A0am, Tad J McClellan <ta...@seesig.invalid> wrote:
> Tim McDaniel <t...@panix.com> wrote:
> > In article <c47f7471-65fd-41cf-bb2d-fa8265369...@k36g2000pri.googlegrou=
ps.com>,
> > A Dude =A0<jjcass...@gmail.com> wrote:
> >>On Jan 27, 12:46=A0am, t...@panix.com (Tim McDaniel) wrote:
> >>> In article <7crsn4hardgt8fvgn3p0uopfv1mtgdf...@4ax.com>,
> >>> J=FCrgen Exner =A0<jurge...@hotmail.com> wrote:
> >>> =A0 =A0 my $output_value =3D (CONDITION) ? 1 : 0;
> >> =A0 =A0my $output_value =3D CONDITION || '0';
>
> Note that this code does not do the same thing as the code quoted above.

It wasn't meant to. He was talking about making it 1 or 0 *not* for
their numerical value, but for "true" and "false". Collapsing "true"
to '1' is a *needless* step if all you're doing is persisting a value
that you are going to evaluate as a boolean to a file.

[...]
>
> This code only normalizes false values to '0', leaving true values
> in their original form.

Uh. Yeah. That's what it does. But the context is *displaying* boolean
values. "If I want to write it to a properties file to be read in
again...[omitted example] just feels amateurish and too verbose to me.
" The constraints Tim puts on it are unneeded.


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

Date: Fri, 30 Jan 2009 15:23:09 -0800 (PST)
From: A Dude <jjcassidy@gmail.com>
Subject: Re: Perl Peeves
Message-Id: <4f93f3f1-8df2-462a-8d30-f11cdf5293c3@h20g2000yqn.googlegroups.com>

On Jan 27, 11:47=A0pm, Uri Guttman <u...@stemsystems.com> wrote:
> >>>>> "AD" =3D=3D A Dude
> =A0 AD> =A0 =A0 $my_boolean=3D
>
> =A0 AD> is illustrative to me. (Unless it might be a ' ')
>
> ' ' is a true value. it would be foolish to ever use it as just a
> boolean if you want to print it.

I forgot how much people on usenet like to argue--even if they have to
forget the context in order to do it.

The concept is the *illustrative value* of printing

$my_boolean=3D

Not the advisability of sticking just anything in $my_boolean.
On a standard terminal/console you can't tell that it's not a ' '.
That's all. I set it was illustrative enough, and I qualified that
with a case where if you accidentally stored a space in there, you
wouldn't be able to see the difference.

It really doesn't matter to me anyway. I use Smart::Comments or a
debugger. If I were to accidentally store a non-visible value in a
scalar meant as a boolean, those tools disambiguate the issue.

That's why I left off with advice to use more mature printing tools.


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

Date: Fri, 30 Jan 2009 18:25:18 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Perl Peeves
Message-Id: <x7r62ktm01.fsf@mail.sysarch.com>

>>>>> "AD" == A Dude <jjcassidy@gmail.com> writes:

  AD> On Jan 27, 11:47 pm, Uri Guttman <u...@stemsystems.com> wrote:
  >> >>>>> "AD" == A Dude <jjcass...@gmail.com> writes:
  >> 
  >>   AD> Then write (the perlish way)
  >> 
  >>   AD>     my $output_value = CONDITION || '0';
  >> 
  >> that is a poor choice of a false value. sure it works but 0 (no quotes)
  >> or '' would be better.

  AD> It wasn't meant to be a false value, just to indicate one when
  AD> *writing it out* to read it back in, later. I specified the string
  AD> '0'. If the condition is not true.

i know what you did. please. my point is that setting the false value to
'0' is a poor idea in general. you don't write out booleans to text
files in most cases. data::dumper or storable can handle that for you
with any false value. so pick one that works better in other
situations. '0' is false but can be subtly odd if manipulated the wrong
way. it is harder to do that with '' or 0. sticking with the most common
false values is a good idea. use it as you wish.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


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

Date: Fri, 30 Jan 2009 23:50:22 +0000 (UTC)
From: tmcd@panix.com (Tim McDaniel)
Subject: Re: Perl Peeves
Message-Id: <gm03nu$dq6$1@reader1.panix.com>

In article <729125d9-9196-4c5d-9607-d90fb216cbf9@v18g2000pro.googlegroups.com>,
A Dude  <jjcassidy@gmail.com> wrote:
>On Jan 28, 6:12 am, Tad J McClellan <ta...@seesig.invalid> wrote:
>> Tim McDaniel <t...@panix.com> wrote:
>> > In article <c47f7471-65fd-41cf-bb2d-fa8265369...@k36g2000pri.googlegroups.com>,
>> > A Dude  <jjcass...@gmail.com> wrote:
>> >>On Jan 27, 12:46 am, t...@panix.com (Tim McDaniel) wrote:
>> >>> In article <7crsn4hardgt8fvgn3p0uopfv1mtgdf...@4ax.com>,
>> >>> Jürgen Exner  <jurge...@hotmail.com> wrote:
>> >>>     my $output_value = (CONDITION) ? 1 : 0;
>> >>    my $output_value = CONDITION || '0';
>>
>> Note that this code does not do the same thing as the code quoted above.
>
>It wasn't meant to. He was talking about making it 1 or 0 *not* for
>their numerical value, but for "true" and "false".

Actually, I ran across a place a little while ago where I WAS using a
boolean where I would have liked a numerical value:
    $command[$use_bash ? 1 : 0]
(where $use_bash had been set via a conditional before).
I could have made it
    $command[$use_bash]
But that code and assumption has since gone away, when I needed
something with more complicated conditions.

-- 
Tim McDaniel, tmcd@panix.com


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

Date: Sat, 31 Jan 2009 09:02:31 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Perl Peeves
Message-Id: <slrngo81cn.lsv.hjp-usenet2@hrunkner.hjp.at>

On 2009-01-30 23:25, Uri Guttman <uri@stemsystems.com> wrote:
>>>>>> "AD" == A Dude <jjcassidy@gmail.com> writes:
>
>  AD> On Jan 27, 11:47 pm, Uri Guttman <u...@stemsystems.com> wrote:
>  >> >>>>> "AD" == A Dude <jjcass...@gmail.com> writes:
>  >> 
>  >>   AD> Then write (the perlish way)
>  >> 
>  >>   AD>     my $output_value = CONDITION || '0';
>  >> 
>  >> that is a poor choice of a false value. sure it works but 0 (no quotes)
>  >> or '' would be better.
>
>  AD> It wasn't meant to be a false value, just to indicate one when
>  AD> *writing it out* to read it back in, later. I specified the string
>  AD> '0'. If the condition is not true.
>
> i know what you did. please. my point is that setting the false value to
> '0' is a poor idea in general. you don't write out booleans to text
> files in most cases.

"Most cases" doesn't matter. Here he wants to. And if the specification
of the file format says that a false value must be represented by the
character '0' (ASCII 0x30), then I find it clearer to use the string '0'
instead of the number 0 in perl code. Sure, print will convert the
number to the correct string, but if you want to print '0', write it.

(Of course in this case you must be sure that CONDITION returns the
right value in the "true" case. As we have seen, the true value of the
relational operators is not defines, so (($x < $y) || '0') is not
correct, you have to write ( $x < $y ? '1' : '0')[1]).

> data::dumper or storable can handle that for you
> with any false value.

Both produce a very perl-specific format. Unless the file is only
intended to be read by another Perl program (or a Perl programmer in the
case of Data::Dumper), they are not appropriate.

	hp

[1] OTOH, perl has used 1 as the return value of the relational
operators for such a long time (probably since version 1) that this is
very unlikely to change even if it isn't defined.


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

Date: Fri, 30 Jan 2009 17:49:43 -0800 (PST)
From: Owen <xemoth@gmail.com>
Subject: Re: perl qt with cygwin?
Message-Id: <184a98b8-e283-45d4-92df-f33f67c8eec4@g3g2000pre.googlegroups.com>

On Jan 31, 9:15 am, rabbits77 <rabbit...@my-deja.com> wrote:
> I am trying to get perl qt to work under cygwin
> and am not having much luck.
> I have KDE and QT installed. Everything should just compile and go
> but this is not the case.
> Googling reveals nothing but very old threads from various sources
> that don't help.
> Does anyone have any advice on how to get perl qt running under cygwin?

Are their any error messages?



Owen


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

Date: Sat, 31 Jan 2009 00:40:15 -0500
From: rabbits77 <rabbits77@my-deja.com>
Subject: Re: perl qt with cygwin?
Message-Id: <gm0o81$v30$1@aioe.org>

Owen wrote:
> On Jan 31, 9:15 am, rabbits77 <rabbit...@my-deja.com> wrote:
>> I am trying to get perl qt to work under cygwin
>> and am not having much luck.
>> I have KDE and QT installed. Everything should just compile and go
>> but this is not the case.
>> Googling reveals nothing but very old threads from various sources
>> that don't help.
>> Does anyone have any advice on how to get perl qt running under cygwin?
> 
> Are their any error messages?
No matter what I do it always fails with a complaint that it cannot find
kde-config.
kde-config is in my PATH. KDE is installed on my machine...
everything should be ok.
Looking at the configure script I suspect that the script is
expecting some output and when I run kde-config manually it just
silently exits. My next course of action is to fiddle with the
configure script but I haven't done that yet.
If I am the only person with these problems I suppose I could
keep some notes about what I am doing and if I get it
to work somehow.
I was hoping though that this was a problem that had already
been solved. :)


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

Date: Fri, 30 Jan 2009 18:51:05 -0800 (PST)
From: ifiaz <fiazidris@gmail.com>
Subject: Re: Text Print Entire Directory Tree including File Names from a FTP  Directory
Message-Id: <63ca1b24-58f4-4c12-8453-57b81ea816ed@w1g2000prk.googlegroups.com>

On Jan 31, 12:21=A0am, Jim Gibson <jimsgib...@gmail.com> wrote:
> In article
> <707ced5c-5f50-4470-83ae-ef8915e3a...@y23g2000pre.googlegroups.com>,
>
>
>
> ifiaz<fiazid...@gmail.com> wrote:
> > Hello,
>
> > I am looking for a way to get the ENTIRE (or at a given depth)
> > directory tree of a FTP folder and files from an FTP server. The
> > listing should include file sizes and modified dates, etc. as much
> > info as possible through some configurable parameters. The same script
> > may be able to be used on a local drive as well.
>
> > I have managed to do this FTP directory task using the
> >http://www.ftprush.com/ftp-directory-tree.htmlapplication. This
> > application is pretty cool and it did exactly what I wanted.
>
> > **********
> > My question is how can I do this using a Perl Script or any other free
> > utility from command line.???
> > **********
>
> > I am sure someone out there who must have written such stuff already.
> > I do not wish to reinvent the wheel and even I am not capable to write
> > such a script myself.
>
> > Any pointers and help is much appreciated. Thank you.
>
> Use the Net::FTP module and its 'dir' command to get a directory
> listing from an FTP server. To get a full directory tree, you will have
> to parse the return from the dir command and follow directory links.
>
> --
> Jim Gibson

Could someone point me to a code which is already available on the
web.

I tried looking around the web and found this among a few others:

http://www.wellho.net/resources/ex.php4?item=3Dp616/ftp2

But, so far nothing worked for me.

The above script works up to a successful login, and then afterwards
nothing is printed out.

This is what I get.

$ /cygdrive/c/x/scripts/recursiveftp.pl
Search FTP site!
Site name: 220.227.165.***
Login name: hidden
Password: hidden
Directory to search from: /New Folder/
/New Folder/
 files, total size  bytes

Please point me to a workable code on the net as I don't think I can
write a successful one myself.


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

Date: Fri, 30 Jan 2009 21:19:09 -0800 (PST)
From: ifiaz <fiazidris@gmail.com>
Subject: Re: Text Print Entire Directory Tree including File Names from a FTP  Directory
Message-Id: <696dfe26-be79-466a-bd30-3f80bfc21927@w1g2000prk.googlegroups.com>

> Could someone point me to a code which is already available on the
> web.
>
> I tried looking around the web and found this among a few others:
>
> http://www.wellho.net/resources/ex.php4?item=3Dp616/ftp2
>
> But, so far nothing worked for me.
>
> The above script works up to a successful login, and then afterwards
> nothing is printed out.
>
> This is what I get.
>
> $ /cygdrive/c/x/scripts/recursiveftp.pl
> Search FTP site!
> Site name: 220.227.165.***
> Login name: hidden
> Password: hidden
> Directory to search from: /New Folder/
> /New Folder/
> =A0files, total size =A0bytes
>
> Please point me to a workable code on the net as I don't think I can
> write a successful one myself.

I did a vardump on the $jpdir and noticed that it returns DOS type
directory list. But, the code in http://www.wellho.net/resources/ex.php4?it=
em=3Dp616/ftp2
expects a unix type dir list.

How can I make the code work with the DOS type Directory Listing. Or,
Are there any other better code out there which can take care of both
types of dir return values.

Here is what I got for the vardump of $jdir:

$Data::Dumper::Indent =3D 3;         # pretty print with array indices
print Dumper($jpdir);

Directory to search from: $VAR1 =3D [
          #0
          '01-22-09  06:55PM       <DIR>          Annexure A2- xxx
Group ppt',
          #1
          '01-22-09  06:56PM       <DIR>          Annexure B1- Copy of
Annual Accounts xxx',
          #2
          '01-22-09  06:56PM       <DIR>          Annexure C - Quality
Manual and safety',
 ... and so on

Please help.



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

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 V11 Issue 2174
***************************************


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