[25198] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7444 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 24 18:05:34 2004

Date: Wed, 24 Nov 2004 15:05: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           Wed, 24 Nov 2004     Volume: 10 Number: 7444

Today's topics:
    Re: Any RT users (Jim Keenan)
    Re: ClearCase 05.00 using ClearCase::CtCmd::exec crash  (Maverick Ieong)
    Re: cookie failes (Anno Siegel)
    Re: cookie failes <nospam@nospam.com>
    Re: CTRL-Z on Win32 <nospam@nospam.com>
    Re: CTRL-Z on Win32 <mritty@gmail.com>
    Re: CTRL-Z on Win32 <nospam@nospam.com>
    Re: CTRL-Z on Win32 <wksmith@optonline.net>
    Re: Dat files help "Att James" hope@hope.com
    Re: Dat files help "Att James" <jgibson@mail.arc.nasa.gov>
        FAQ 7.26: How can I comment out a large block of perl c <comdog@panix.com>
        FAQ 9.16: How do I decode a CGI form? <comdog@panix.com>
        Favorite config file management module? <socyl@987jk.com.invalid>
        for Richard Gration <nospam@nospam.com>
    Re: Fork, exec - setsid? (Anno Siegel)
    Re: Grep -v option (David Combs)
        Perl opendir with spaces in directory names <geenbestaandadres@lycos.nl>
    Re: Perl opendir with spaces in directory names <mothra@nowhereatall.com>
    Re: Perl opendir with spaces in directory names <postmaster@castleamber.com>
    Re: redirect question <jurgenex@hotmail.com>
    Re: redirect question <nospam@nospam.com>
    Re: ssi querystring <mritty@gmail.com>
    Re: ssi querystring <tryandspamme@youcant.com>
    Re: ssi querystring <tadmc@augustmail.com>
    Re: Using embedded PERL with commercial applications? <donal.k.fellows@manchester.ac.uk>
    Re: Using embedded PERL with commercial applications? <tassilo.von.parseval@rwth-aachen.de>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 24 Nov 2004 13:27:18 -0800
From: jkeen_via_google@yahoo.com (Jim Keenan)
Subject: Re: Any RT users
Message-Id: <196cb7af.0411241327.60bee4e8@posting.google.com>

sa_ravenone@yahoo.com (Sara) wrote in message news:<8e3b2dfa.0411232111.4e57a436@posting.google.com>...
> Hi all,
>   Please correct me if this is an off-topic question.
> I know that there are separate forums for Request Tracker, but thought
> it would be good if I can get suggestions from our clpm community.
> I am looking for some help/pointers to get started with RT
> customization (objects and HTML Mason).


Google quickly located:
http://www.perl.com/pub/a/2001/11/28/request.html


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

Date: 24 Nov 2004 14:32:08 -0800
From: mluvw47@gmail.com (Maverick Ieong)
Subject: Re: ClearCase 05.00 using ClearCase::CtCmd::exec crash perl 5.8.3
Message-Id: <d4b6522b.0411241432.7af04212@posting.google.com>

I found out the problem is one of the patch from Rational mass up the dll.

Thanks,
Mav

mluvw47@gmail.com (Maverick Ieong) wrote in message news:<d4b6522b.0411230853.3bda4bf3@posting.google.com>...
> Hi,
>   I have perl (5.8.3), and the ClearCase verison (From Help About),
> Rational Clearcase Explorer 2002.05.00+, Copyright 1990,2004 Rational
> Software Co-operation. Running the following script will a dialog
> "Perl Command Line Interpreter, For information about this error,
> click here"
> When I click on the link: 
> Error signature AppName perl.exe AppVer: 5.8.3.809 ModName:
> libatriaks.dll
> ModVer:0.0.0.0 Offset:0001b478
> 
> #This is a simple list vobs script
> use strict;
> use warnings;
> use ClearCase::CtCmd;
> my @test;
> @test = ClearCase::CtCmd::exec("lsvob");
> print @test;
> 
> Anybody encouter this problem?
> I have a machine running the same perl, the ClearCase verison show
> Rational Clearcase Explorer 2002.05.00+, Copyright 1990,2003 Rational
> Software Co-operation.(note the copyright date show 2003) Running the
> above script no problem. Is that some kind of patch have installed?
> How can I tell? If so, is that a way to backout the patch?
> 
> TIA,
> Mav


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

Date: 24 Nov 2004 21:06:18 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: cookie failes
Message-Id: <co2t4a$31$1@mamenchi.zrz.TU-Berlin.DE>

daniel kaplan <nospam@nospam.com> wrote in comp.lang.perl.misc:
> "Charlton Wilbur" <cwilbur@mithril.chromatico.net> wrote in message
> news:87llcrxpa0.fsf@mithril.chromatico.net...
> 
> > Actually, you seem to believe that he's learning.  Given his demeanor
> > here, I think you're giving him too much credit.
> 
> talk about vreating unecessary noise in a group....

Nah, we're having fun.  That's always on topic!

Anno


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

Date: Wed, 24 Nov 2004 16:12:43 -0500
From: "daniel kaplan" <nospam@nospam.com>
Subject: Re: cookie failes
Message-Id: <1101330848.881689@nntp.acecape.com>

"Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
news:co2t4a$31$1@mamenchi.zrz.TU-Berlin.DE...

> Nah, we're having fun.

i don't doubt that in the slightest...




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

Date: Wed, 24 Nov 2004 11:17:47 -0500
From: "daniel kaplan" <nospam@nospam.com>
Subject: Re: CTRL-Z on Win32
Message-Id: <1101313151.675667@nntp.acecape.com>

"Paul Lalli" <mritty@gmail.com> wrote in message
news:ff2pd.6013$K36.1563@trndny03...


> Please do not accuse me of not reading your post before replying.  Thank
> you.

i didn't, i said re-read it in case you misread it....never accused you of
NOT

>>>Once again, this problem is wholly unrelated to the language being used.

to me, this was you saying i misread the probelm and was answering from the
wrong angle...sorry if you took it the wrong way...i can take this both way
especially when you said:

>>The secondary point of my post was to attempt to explain to
> you why your almost-constant disclaimers of "I don't know Perl well,
> but..." are irrelevant to the problem at hand.

i feel i have to say this with EVERY post i have made when I try to help
someone....this thread was my second or third....i feel i have to say that
because we've all been there where we can't figure out "what on earth is
happening" and we just reach out to any straws we can clutch at.....but i
feel even in those situations, that not explainning i am a newbie would be
misleading....hence, "take this with a grain of salt since it's comign from
me"

hope that better explains it?

daniel




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

Date: Wed, 24 Nov 2004 16:27:11 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: CTRL-Z on Win32
Message-Id: <zD2pd.6089$hJ6.2098@trndny01>


"daniel kaplan" <nospam@nospam.com> wrote in message
news:1101313151.675667@nntp.acecape.com...
> I wrote:
> > The secondary point of my post was to attempt to explain to
> > you why your almost-constant disclaimers of "I don't know Perl well,
> > but..." are irrelevant to the problem at hand.
>
> i feel i have to say this with EVERY post i have made when I try to
help
> someone....this thread was my second or third....i feel i have to say
that
> because we've all been there where we can't figure out "what on earth
is
> happening" and we just reach out to any straws we can clutch
at.....but i
> feel even in those situations, that not explainning i am a newbie
would be
> misleading....hence, "take this with a grain of salt since it's comign
from
> me"
>
> hope that better explains it?

You continue to miss my point entirely.  I'm not claiming it's wrong of
you to prepend attempts at helping with Perl problems with a "I'm new at
this" warning.  I'm trying to get you to understand that your "Perl
newbie" warning in this thread is as useful and meaningful as the
statement "I'm new at changing my car's tires, but . . . " would have
been in its place.

I'm just trying to help you understand that the first part in solving a
problem is to understand what the problem is.  Throwing in random
statements that have nothing to do with a problem are red herrings that
can serve only to add to the confusion of both the original questioner
as well as any future readers of the thread.  Therefore, it is most
beneficial to everyone involved to try to determine what the problem is
(or at the very least, what it is *not*) before posting.

With that, I'm done with this thread.  I hope I was able to help a
little.

Paul Lalli



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

Date: Wed, 24 Nov 2004 12:01:35 -0500
From: "daniel kaplan" <nospam@nospam.com>
Subject: Re: CTRL-Z on Win32
Message-Id: <1101315776.552122@nntp.acecape.com>

"Paul Lalli" <mritty@gmail.com> wrote in message
news:zD2pd.6089$hJ6.2098@trndny01...

> I'm just trying to help you understand that the first part in solving a
> problem is to understand what the problem is.  Throwing in random
> statements that have nothing to do with a problem are red herrings that


you're right....i should have just spoken my piece about past experience
with ME (since it related to the other person making it work on 2000) and
left it at that....but after our Perl guy went through with ME and how it
all disappeared once he got off it it, i felt i should have at least said
that....

throwing in " i think ctrl-z does this that and the other thign" is just
like the lawyer who doesn't know when to shut up afetr making his case
(ear-biting story, etc...)

thjanks
daniel




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

Date: Wed, 24 Nov 2004 16:40:56 -0500
From: "Bill Smith" <wksmith@optonline.net>
Subject: Re: CTRL-Z on Win32
Message-Id: <zc7pd.800$xE5.728@fe12.lga>


"daniel kaplan" <nospam@nospam.com> wrote in message
news:1101270987.621584@nntp.acecape.com...
> "Rhesa Rozendaal" <perl&nntp@rhesa.com> wrote in message
> news:419ffa3d$0$65124$e4fe514c@news.xs4all.nl...
>
> > There might be though, since the shells of Win95/98/ME are different
> > from those of WinNT/2000/XP.
>
> > Did you enter the ctrl-z on a new line?
> >
> > It works for me on windows 2000 and up, so you may indeed have run
into
> > an IO difference between 98 and NT here. There's not much perl can
do
> > for you. Just make sure you type in an extra blank line before doing
> ctrl-z.
> >
>
> bill,
>
> this is already a few days old, so between rhesa and yourself you
probably
> already figured it out.
> is it having to do the ctrl-z on a separate line?  possibly.  i am
still a
>


I have been having a problem with my newsgroup server and been unable to
reply for a few days.

Thanks for all who replied, especially those who tested on other
systems.  I have concluded that there are several minor differences in
the way that MS systems handle CTRL-Z.  Perl cannot fix this problem.

Bill




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

Date: Wed, 24 Nov 2004 20:36:52 GMT
From: hope@hope.com
Subject: Re: Dat files help "Att James"
Message-Id: <h2r9q0lpmkd35tc7g1qkhbtova6gcm4lbg@4ax.com>

Hi James

Thank you for your help with me 

Please see below comments


On Sun, 21 Nov 2004 22:43:48 GMT, "James Tolley" <james@emarch.net> wrote:

><hope@hope.com> wrote in message
>news:hi01q0he2cphu125d6b46pvjqcfs7tbj8v@4ax.com...
>> Hi
>>
>> 1....I have a load of dat files in a folder called users  this is in the
>cgi folder like
>>
>>       c:\apache\apache2\cgi-bin\data\users\1234.dat 5678.dat etc
>>
>> 2.....Inside each of these dat files I have information like
>>        password
>>        email
>>        FullName
>>        Street Address
>>        City
>>        Country
>>        Zip
>>        Phone
>> 3.....Now what I want to do is fetch the above info out of the dat files
>and do one of two things
>>
>>       1......Put in a excel l file   OR
>>       2......Make a text/csv file  with information all on one line with
>it separated by a ","   I then can import that into a excel my self
>>
>
>Something LIKE this should work:
>
>use Text::CSV;         

Ok I have found out about Text:: CSV and  how to get that module and install it.
I did not know about those things so another learning curve for me

###########################################################
>
>my $csv = Text::CSV->new;
>
>open my $out, '+>/home/me/outfile' or die $!;

I presume that the above means on my windows apache puter
c:\the folder where to store the file that it makes\test.txt 

YES
###############################################
>opendir my $dh, '/usr/local/whatever' or die $!; # open the dir

Ok the above is the folder where my dat files are like
c:\1\35

###############################


>my @files = grep /\.dat$/, readdir $dh; # only get dat files
>
>for my $file (@files) {
>    open my $fh, "$dir/$file" or die $!;
>    read $fh, my $data, -s $fh;
>    my @fields = split /\n/, $data;
>    $csv->combine(@fields);
>    print $out $csv->string."\n";
>}
>
>__END__

If I have all the above correct then it does not work

What I have is this

Run the script 

I get a error come back from the apache log file like

No such file or directory at finddir.cgi  line 13

BUT it DID save a file in the c:\1 folder called test.txt BUT nothing in it


Now I have tried to find out why this is my self what I have done is this

Put at the top of the script
use warnings
use CGI:: Carp dw(fatelsToBrowser)

Which returns the errors like
Name "Main::dir" used only once possible typo at line 13
Use of uninitalized value in concatenation (.) or string at line 13

Now I have done a search on these errors but came up with a load of stuff but could not find anything to do with the above

The only thing that I found was a statement saying that the  " open my $fh, "$dir/$file" or die $!;"    these two "$dir/$file" was not defined


Now that lost me

Hope you can fine the time to help me some more


As always, any and all help is greatly appreciated.

Thank you in advance.

John     


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

Date: Wed, 24 Nov 2004 14:26:58 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: Dat files help "Att James"
Message-Id: <241120041426585338%jgibson@mail.arc.nasa.gov>

In article <h2r9q0lpmkd35tc7g1qkhbtova6gcm4lbg@4ax.com>,
<hope@hope.com> wrote:
> 
> >my @files = grep /\.dat$/, readdir $dh; # only get dat files
> >
> >for my $file (@files) {
> >    open my $fh, "$dir/$file" or die $!;
> >    read $fh, my $data, -s $fh;
> >    my @fields = split /\n/, $data;
> >    $csv->combine(@fields);
> >    print $out $csv->string."\n";
> >}
> >
> >__END__
> 
> If I have all the above correct then it does not work
> 


> 
> Put at the top of the script
> use warnings
> use CGI:: Carp dw(fatelsToBrowser)

Spelling counts. Did you cut and paste this out of your program or
re-type it?

> 
> Which returns the errors like
> Name "Main::dir" used only once possible typo at line 13
> Use of uninitalized value in concatenation (.) or string at line 13

These are warnings, not fatal errors, but they may be significant.


> As always, any and all help is greatly appreciated.

Please post a complete, as-short-as-possible program that demonstrates
the problem you are having. Cut and paste the exact code; do not
re-type it. Then someone might be able to help you.

From the above, I might guess that $dir is undefined.


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

Date: Wed, 24 Nov 2004 17:03:01 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 7.26: How can I comment out a large block of perl code?
Message-Id: <co2es5$mbt$1@reader1.panix.com>

This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with Perl.

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

7.26: How can I comment out a large block of perl code?

    You can use embedded POD to discard it. Enclose the blocks you want to
    comment out in POD markers, for example "=for nobody" and "=cut" (which
    marks ends of POD blocks).

        # program is here

        =for nobody

        all of this stuff

        here will be ignored
        by everyone

        =cut

        # program continues

    The pod directives cannot go just anywhere. You must put a pod directive
    where the parser is expecting a new statement, not just in the middle of
    an expression or some other arbitrary grammar production.

    See perlpod for more details.



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

Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short.  They represent an important
part of the Usenet tradition.  They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.

If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile.  If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.

Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release.  It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.

The perlfaq manual page contains the following copyright notice.

  AUTHOR AND COPYRIGHT

    Copyright (c) 1997-2002 Tom Christiansen and Nathan
    Torkington, and other contributors as noted. All rights 
    reserved.

This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.


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

Date: Wed, 24 Nov 2004 23:03:01 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 9.16: How do I decode a CGI form?
Message-Id: <co33v5$107$1@reader1.panix.com>

This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with Perl.

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

9.16: How do I decode a CGI form?

    You use a standard module, probably CGI.pm. Under no circumstances
    should you attempt to do so by hand!

    You'll see a lot of CGI programs that blindly read from STDIN the number
    of bytes equal to CONTENT_LENGTH for POSTs, or grab QUERY_STRING for
    decoding GETs. These programs are very poorly written. They only work
    sometimes. They typically forget to check the return value of the read()
    system call, which is a cardinal sin. They don't handle HEAD requests.
    They don't handle multipart forms used for file uploads. They don't deal
    with GET/POST combinations where query fields are in more than one
    place. They don't deal with keywords in the query string.

    In short, they're bad hacks. Resist them at all costs. Please do not be
    tempted to reinvent the wheel. Instead, use the CGI.pm or CGI_Lite.pm
    (available from CPAN), or if you're trapped in the module-free land of
    perl1 .. perl4, you might look into cgi-lib.pl (available from
    http://cgi-lib.stanford.edu/cgi-lib/ ).

    Make sure you know whether to use a GET or a POST in your form. GETs
    should only be used for something that doesn't update the server.
    Otherwise you can get mangled databases and repeated feedback mail
    messages. The fancy word for this is ``idempotency''. This simply means
    that there should be no difference between making a GET request for a
    particular URL once or multiple times. This is because the HTTP protocol
    definition says that a GET request may be cached by the browser, or
    server, or an intervening proxy. POST requests cannot be cached, because
    each request is independent and matters. Typically, POST requests change
    or depend on state on the server (query or update a database, send mail,
    or purchase a computer).



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

Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short.  They represent an important
part of the Usenet tradition.  They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.

If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile.  If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.

Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release.  It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.

The perlfaq manual page contains the following copyright notice.

  AUTHOR AND COPYRIGHT

    Copyright (c) 1997-2002 Tom Christiansen and Nathan
    Torkington, and other contributors as noted. All rights 
    reserved.

This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.


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

Date: Wed, 24 Nov 2004 21:57:14 +0000 (UTC)
From: kj <socyl@987jk.com.invalid>
Subject: Favorite config file management module?
Message-Id: <co303q$shq$1@reader1.panix.com>





I went to CPAN looking for modules to manage an application's config
file.  By "manage" I mean both writing/updating it at configuration
time, as well as parsing it at runtime.  For example it would be
nice to have a module that facilitated the writing of the app's
configuration tool.

Well, as usual, there are about one bazillion and a half modules
in CPAN related to handling config files...

So I thought I'd try to get some recommendations from the readers
of clpm.  Any suggestions?

Thanks in advance,

kj

-- 
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.


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

Date: Wed, 24 Nov 2004 16:30:35 -0500
From: "daniel kaplan" <nospam@nospam.com>
Subject: for Richard Gration
Message-Id: <1101331921.679879@nntp.acecape.com>

richard,

wanted to thank you for your solution under the topic "redirect question"

i can only assure you that i never your reply NEVER hit my newserver, as
neither did my OP...guess i should toss out OE, it's far from perfect....but
that's for a different rant...

thanks for your help...

daniel




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

Date: 24 Nov 2004 22:18:11 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Fork, exec - setsid?
Message-Id: <co31b3$25v$1@mamenchi.zrz.TU-Berlin.DE>

Robert Manea  <rob@nova.hbx.us> wrote in comp.lang.perl.misc:
> Segfault in module "Anno Siegel" - dump details are as follows:
> 
> > That would mean that one or another of the programs you start has
> > demon-like properties and puts itself in the background (It may leave
> > a pidfile around, if so).
> 
> Well, if I understand the documentation correctly I have to contradict
> you.

You're right.  A pipeline can survive the shell that started it.

Anno


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

Date: Wed, 24 Nov 2004 22:12:12 +0000 (UTC)
From: dkcombs@panix.com (David Combs)
Subject: Re: Grep -v option
Message-Id: <co30vs$ssi$1@reader1.panix.com>

In article <rcgwtx1w7x3.fsf@Jon-Ericson.sdsio.prv>,
Jon Ericson  <Jon.Ericson@jpl.nasa.gov> wrote:
>mlockett@alfains.com (Mark Lockett) writes:
>
>> I am trying to parse lines out of a txt file. Instead of running the
>> command three times, how can I add all the parameters together for the
>> -v option. Thanks for the help.
>
>This isn't strictly a Perl question.  In shell:
>
>  $ grep -v x filename | grep -v y | grep -v z

egrep allows alternation, no?
>
>With perl:
>
> $ perl -ne 'print unless /x|y|z/' filename
>
>It sound's like you have some problem with the shell solution, but I
>don't know what it might be.
>
>Jon




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

Date: Wed, 24 Nov 2004 18:25:57 +0100
From: "JJ" <geenbestaandadres@lycos.nl>
Subject: Perl opendir with spaces in directory names
Message-Id: <41a4c478$0$44094$5fc3050@dreader2.news.tiscali.nl>

Hi all,

I'm using opendir(dirhandle, expr), but perl seems te be unable to open the
dir specified in the expr. My expression is "C:\\My Documents\\My
Pictures\\". When I use C:\\Windows\\System32\\ it works fine, but I guess
spaces aren't alowed here. How can I solve this problem without renaming my
directory?

Thanks, Vincent




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

Date: Wed, 24 Nov 2004 09:44:48 -0800
From: "mothra" <mothra@nowhereatall.com>
Subject: Re: Perl opendir with spaces in directory names
Message-Id: <41a4c87d$1@usenet.ugs.com>


"JJ" <geenbestaandadres@lycos.nl> wrote in message
news:41a4c478$0$44094$5fc3050@dreader2.news.tiscali.nl...
> Hi all,
>
> I'm using opendir(dirhandle, expr), but perl seems te be unable to open
the
> dir specified in the expr. My expression is "C:\\My Documents\\My
> Pictures\\". When I use C:\\Windows\\System32\\ it works fine, but I guess
> spaces aren't alowed here. How can I solve this problem without renaming
my
> directory?
>
> Thanks, Vincent
>
Works for me !!

use strict;
use warnings;

opendir (IN, "c:/documents and settings") or die "Can't open dir:$!\n";

while (defined ( my $filename = readdir(IN) ) )   {
  print $filename, "\n";
}

output:F:\scripts>test.pl
 .
 ..
Administrator
All Users
Default User
test
ugplot

Hope this helps

Mothra


Hope this helps




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

Date: 24 Nov 2004 17:47:09 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Re: Perl opendir with spaces in directory names
Message-Id: <Xns95AB77E3ED96Acastleamber@130.133.1.4>

JJ wrote:

> Hi all,
> 
> I'm using opendir(dirhandle, expr), but perl seems te be unable to
> open the dir specified in the expr. My expression is "C:\\My
> Documents\\My Pictures\\". When I use C:\\Windows\\System32\\ it works
> fine, but I guess spaces aren't alowed here. How can I solve this
> problem without renaming my directory?
> 
> Thanks, Vincent

use strict;
use warnings;

my $dir = 'C:\Documents and Settings\John\Mis documentos\Mis imágenes';

opendir my $dh, $dir or die "Can't opendir '$dir': $!";
my @jpg = grep /\.jpe?g$/i, readdir $dh;
closedir $dh or die "Can't closedir '$dir': $!";

print join "" => map { "$_\n" } @jpg;


000_0946.JPG
000_0947.JPG
000_0948.JPG
000_1019.JPG
:
:


Note that you can use / instead of \.

-- 
John                   Small Perl scripts: http://johnbokma.com/perl/
               Perl programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html
                        


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

Date: Wed, 24 Nov 2004 16:27:37 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: redirect question
Message-Id: <ZD2pd.2522$TG2.1575@trnddc01>

daniel kaplan wrote:
> "Alan Mead" <amead@comcast.net> wrote in message
> news:pan.2004.11.24.08.14.40.467106@comcast.net...
>
>> I am soooo dull at 1:20 am... c.i.w.a.cgi is self-moderated.  You
>> need to approve your post if you want it to appear.  Look at any
>> article there for a link that explains it...
>
> WOW, thanks so much for telling me that......

Wait a second. Are you telling us that you didn't know? I mean, are you 
saying that you just went ahead and blasted an article there without lurking 
and reading before? Please tell me my conclusion is wrong because I believed 
even you weren't  _that_ much of a jerk.

jue





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

Date: Wed, 24 Nov 2004 12:13:16 -0500
From: "daniel kaplan" <nospam@nospam.com>
Subject: Re: redirect question
Message-Id: <1101316477.799391@nntp.acecape.com>

"Jürgen Exner" <jurgenex@hotmail.com> wrote in message
news:ZD2pd.2522$TG2.1575@trnddc01...
> daniel kaplan wrote:


> Wait a second. Are you telling us that you didn't know? I mean, are you
> saying that you just went ahead and blasted an article there without
lurking
> and reading before? Please tell me my conclusion is wrong because I
believed
> even you weren't  _that_ much of a jerk.

oh, regardless, mosts here will tell you how much of a jerk i am.....

but i did lurk, only as soon as i saw SELF-MODERATED, i just read that to
mean, NON-moderated, and behave on your own...like a disclaimer...i have
seen MODEERATED groups...and know what those are, never heard of the
INBETWEEN..so just assumed posting guidelines were like here....

of course this final explination shoudl pretyy much be like dousing myself
in gasoline, so please...feel free....

daniel




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

Date: Wed, 24 Nov 2004 16:34:15 GMT
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: ssi querystring
Message-Id: <bK2pd.6091$hJ6.3776@trndny01>

"Stuart Palmer" <tryandspamme@youcant.com> wrote in message
news:30jirgF30h8tkU1@uni-berlin.de...
> Not sure if this is the right place to post this as it's pure ssi
question,
> but I'll try anyway......
>
> I have a server that only allows me to run ssi code. No perl, no asp,
just
> ssi code.

Er, so you acknowledge that Perl is no where involved in your question,
and yet you're not sure whether or not comp.lang.perl.misc is the proper
place for your question?

> I can pull into a variable - <!--#set var="querystring"
> value="$QUERY_STRING" -->
>
> Now, if my querystring passed through has 3 params and values, I'd
like to
> split this up or pull in each of the 3 values into seperate variables,
so I
> can process them seperatly.
>
> I would imagine that perhaps I might be able to do something like:
> <!--#set var="var1" value="$QUERY_STRING('variable1')" -->
> <!--#set var="var2" value="$QUERY_STRING('variable2')" -->
> <!--#set var="var3" value="$QUERY_STRING('variable3')" -->
> but not sure if this is valid context, if indeed it can be done.

Despite myself, I have to ask - if you're not sure whether or not the
above is valid, *what happened when you tried it?*.  Why is that not
your first step in trying to determine if something you think *might* be
possible actually *is* possible?

> Is there anyway I can do this?...if so, how? I don't want to use
Javascript
> (as this defeats the object or what I am trying to achieve)

As a guess, I'd say one of the comp.infosystems.www.* groups is where
you want to go.



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

Date: Wed, 24 Nov 2004 16:53:30 -0000
From: "Stuart Palmer" <tryandspamme@youcant.com>
Subject: Re: ssi querystring
Message-Id: <30jskbF32fkqnU1@uni-berlin.de>

Thx Paul, I found the answer now:

<!--#set var="ue_querystring" value="$QUERY_STRING_UNESCAPED" -->
<!--#if expr="\"$ue_querystring\" = /.*value_checking_for_in_qs.*/" -->


The reason I tried here is because everything I looked up on xssi pointed to
perl......so where better place to try first?

Imagining doesn't mean I didn't try the code I stated, and I assumed that as
it didn't work thats why I was having problem, so wasn't sure what the code
could be, hence the question.

All you needed to say was, 'not the right place try comp.infosystems.www.*
groups', not talk down to someone who needs assistance, it's not very
constructive and a waste of yours and my time......

Thx anyway for the group, I will try that...
Stu




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

Date: Wed, 24 Nov 2004 12:22:19 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: ssi querystring
Message-Id: <slrncq9kar.7qs.tadmc@magna.augustmail.com>

Stuart Palmer <tryandspamme@youcant.com> wrote:

> it's not very
> constructive and a waste of yours and my time......


If your off-topic post wasted the time of only 2 people it
wouldn't be much of a big deal.

But that isn't what happened, your off-topic post wasted the time
of the *hundreds* of people that read this newsgroup.


It is constructive (for the newsgroup) to discourage people from
making off-topic postings.

If we didn't, then observers might think that off-topic posts
were OK, and start sending their's too, and the S/N ratio here
would go from the toilet (its normal level) to the sewer proper.


It is constructive (for you) to know that there is a better place
to get the answer to your question.


That is, the followup was constructive for all involved!

(and even for many who were not involved.)


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


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

Date: Wed, 24 Nov 2004 16:39:29 +0000
From: "Donal K. Fellows" <donal.k.fellows@manchester.ac.uk>
Subject: Re: Using embedded PERL with commercial applications?
Message-Id: <co2dg9$ne2$1@godfrey.mcc.ac.uk>

Tassilo v. Parseval wrote:
> I don't think so.
[...]

Maybe, but this sort of confusion is what makes people reach for the
legal advice. Which I think was my original point... ;^)

Donal.


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

Date: Wed, 24 Nov 2004 20:10:07 +0100
From: "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de>
Subject: Re: Using embedded PERL with commercial applications?
Message-Id: <slrncq9n4f.18f.tassilo.von.parseval@localhost.localdomain>

Also sprach Donal K. Fellows:

> Tassilo v. Parseval wrote:
>> I don't think so.
> [...]
>
> Maybe, but this sort of confusion is what makes people reach for the
> legal advice. Which I think was my original point... ;^)

And my original point was to ask the copyright holder when in doubt. No
legal advice required. What he says is authorative.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

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


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