[25101] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7351 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 2 14:05:41 2004

Date: Tue, 2 Nov 2004 11: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           Tue, 2 Nov 2004     Volume: 10 Number: 7351

Today's topics:
        Anzeige aller Druckertreiber mit Perl (Ronny Kluge)
    Re: Anzeige aller Druckertreiber mit Perl <1usa@llenroc.ude.invalid>
    Re: Anzeige aller Druckertreiber mit Perl (Anno Siegel)
        behavior of run_on_wait in Parallel::ForkManager ctcgag@hotmail.com
    Re: Extracting Directories and Sub Directories and Coun <tadmc@augustmail.com>
    Re: Extracting Directories and Sub Directories and Coun <noreply@gunnar.cc>
    Re: Extracting Directories and Sub Directories and Coun <nobull@mail.com>
    Re: FAQ 4.35: How do I find the soundex value of a stri <nobull@mail.com>
        FAQ 4.62: Why don't my tied hashes make the defined/exi <comdog@panix.com>
    Re: Global @INC <usenet@morrow.me.uk>
        hash key order different in perl 5.8? john_pataki@yahoo.com
    Re: hash key order different in perl 5.8? <notvalid@email.com>
    Re: hash key order different in perl 5.8? <nobull@mail.com>
        List all Printer-Driver on a Mashine (Ronny Kluge)
    Re: List all Printer-Driver on a Mashine <lwt0301@bellsouth.net>
    Re: List all Printer-Driver on a Mashine <tadmc@augustmail.com>
    Re: modifying hash key (dispatch table) <usenet@morrow.me.uk>
    Re: Perl is awsome! (Bjarne Stroustrup)
        Perl is better than C++ will ever be <bs@research.att.com>
    Re: Perl is better than C++ will ever be <cdclark@scatcat.fhsu.edu>
    Re: Perl is better than C++ will ever be <1usa@llenroc.ude.invalid>
    Re: Proper quitting <nospam@nospam.com>
    Re: Regular Expression for - \C\R... <do-not-use@invalid.net>
    Re: Regular Expression for - \C\R... (Anno Siegel)
        Win32 Advanced Properties <dontwannasay@home.com>
    Re: Win32 Advanced Properties <shakotah@spymac.com>
    Re: Win32 Advanced Properties <jurgenex@hotmail.com>
    Re: Win32 Advanced Properties <1usa@llenroc.ude.invalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 2 Nov 2004 05:02:49 -0800
From: ronny.kluge@barmenia.de (Ronny Kluge)
Subject: Anzeige aller Druckertreiber mit Perl
Message-Id: <207553d4.0411020502.76cbf174@posting.google.com>

Hallo zusammen,

ich möchte eine Liste der installierten Druckertreiber auf einer Maschine erhalten. 

Bisher konnte ich nirgends etwas zu diesem Thema finden.

Thanxs im voraus, 

Greets, Ronny.


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

Date: 2 Nov 2004 13:53:54 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Anzeige aller Druckertreiber mit Perl
Message-Id: <Xns95955A85385B0asu1cornelledu@132.236.56.8>

ronny.kluge@barmenia.de (Ronny Kluge) wrote in
news:207553d4.0411020502.76cbf174@posting.google.com: 

> Hallo zusammen,
> 
> ich möchte eine Liste der installierten Druckertreiber auf einer
> Maschine erhalten. 
> 
> Bisher konnte ich nirgends etwas zu diesem Thema finden.
> 
> Thanxs im voraus, 

de.comp.lang.perl.misc is down the hallway.

Sinan.


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

Date: 2 Nov 2004 13:59:43 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Anzeige aller Druckertreiber mit Perl
Message-Id: <cm83sf$dhr$2@mamenchi.zrz.TU-Berlin.DE>

Ronny Kluge <ronny.kluge@barmenia.de> wrote in comp.lang.perl.misc:
> Hallo zusammen,
> 
> ich möchte eine Liste der installierten Druckertreiber auf einer
> Maschine erhalten. 
> 
> Bisher konnte ich nirgends etwas zu diesem Thema finden.

comp.lang.perl.misc is an international discussion group.  Only a few
readers happen to read German.

Your question has nothing to do with Perl and everything with your
system.  Find out how to list all printer drivers, perhaps posting
to a system-specific newsgroup.  Then, if necessary, come back and
ask specific questions on how to do that in Perl.

Anno


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

Date: 02 Nov 2004 19:01:05 GMT
From: ctcgag@hotmail.com
Subject: behavior of run_on_wait in Parallel::ForkManager
Message-Id: <20041102140105.764$M1@newsreader.com>

Parallel::ForkManager allows one to set a code-ref to be run when the
parent program has to wait for children to exit (because the limit on
number of active children has been met or exceeded).  One can set a timer
to determine how often the callback is invoked during extended waiting.
However, I do not want it to wait unnecessarily, i.e. the waiting period
should apply only to another callback, and not to other events which could
allow the main program to proceed, like the exit of one of the children it
is waiting on.

The module code implementing this is:

sub on_wait { my ($s)=@_;
  if(ref($s->{on_wait}) eq 'CODE') {
    $s->{on_wait}->();
    if (defined $s->{on_wait_period}) {
        local $SIG{CHLD} = sub { } if ! defined $SIG{CHLD};
        select undef, undef, undef, $s->{on_wait_period}
    };
  };
};

What I am observing (on Linux, under both Perl 5.6.1 and 5.8.0) is that
sometimes the receipt of a SIGCHLD will interupt the "select", and then
allow the program to go on it's way without finishing the time (The desired
result); while sometimes the receipt of a SIGCHLD will apparently either
not interupt the "select" at all, or will interupt it but them restart it.
(not the desired result.)

As best as I can tell from experimentation, the desired behavior happens
only the first time the on_wait method is invoked, and the undesired
behavior happens thereafter, although I am far from certain about that.

Is there a simple change I can make so that I always get the desired
behavior?

Experiments done with:

use strict;
use warnings;
use Parallel::ForkManager;

my $w=10;
my $s=5;

my $pm=Parallel::ForkManager->new(2);
$pm->run_on_wait(sub {warn "Waiting Patiently. ", scalar time} , $w);
foreach (1..5) {
  $pm->start() and next;
  warn "Started event $_. ", scalar time;
  sleep $s;
  warn "Ending event $_. ", scalar time;
  $pm->finish();
};
$pm->run_on_wait(sub {warn "Waiting Patiently to END. ", scalar time} ,
$w); $pm->wait_all_children;



Thanks,

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: Tue, 2 Nov 2004 05:11:39 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Extracting Directories and Sub Directories and Counting
Message-Id: <slrncoeqrb.28i.tadmc@magna.augustmail.com>

Ron Smith <geeksatlarge@yahoo.com> wrote:


>     print join ( "\n", $dir ), "\n\n";

That statement is equivalent to this one:

   print "$dir\n\n";

i.e. the join() doesn't do anything.

What were you hoping that join() would do for you there?


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


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

Date: Tue, 02 Nov 2004 13:40:21 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Extracting Directories and Sub Directories and Counting
Message-Id: <2updhcF2bppn7U1@uni-berlin.de>

Ron Smith wrote:

<code snipped>

> gives me:
> 
> file_base_name     file_count
> 
> in two columns. How would I add additional columns like:
> 
> file_base_name     file_count    File_extension    file_size
> 
> Which construct would I use? Would it be a 'HoH', or simply expand on
> a 'HoA', or is it another construct like 'AoA' or AoH?

I was very disappointed to see this post here, Ron. First of all, since 
you posted basically the same question to beginners@perl.org (where I 
have answered it, btw), what you did is called multi-posting and is 
considered rude. See why here:

http://www.uwasa.fi/~ts/http/crospost.html

Furthermore, your question was preceded by a long thread at 
beginners@perl.org:

http://www.mail-archive.com/beginners%40perl.org/msg63290.html

Do you really believe that you explained your problem properly to those 
who have not read the previous posts?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Tue, 02 Nov 2004 18:08:26 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Extracting Directories and Sub Directories and Counting
Message-Id: <cm8i63$d48$1@sun3.bham.ac.uk>



Michele Dondi wrote:

> On 1 Nov 2004 20:48:39 -0800, geeksatlarge@yahoo.com (Ron Smith)
> wrote:
> 
> 
>>#!/usr/bin/perl
> 
> [snip code]
> 
> Please don't take my words as a personal attack, but this made my
> heart really hurt. I didn't even try to understand your code. What do
> you really want to do? Maybe someone may suggest more effective ways
> to do it.
> 
> Also, the 'dir /b/s' bit suggests you may be interested in File::Find,
> anyway.

I have found that File::Find can be slow on Win32 (because, IIRC, stat() 
is rediculously slow[1]). For most things this is not enough to stop me 
using File::Find but occasionally for really big trees I've resorted to 
parsing the output of 'dir /b /s'.

[1] I'm not sure this is still the case as I'm talking about something I 
encountered many years ago.



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

Date: Tue, 02 Nov 2004 18:12:46 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: FAQ 4.35: How do I find the soundex value of a string?
Message-Id: <cm8ie8$d48$2@sun3.bham.ac.uk>



PerlFAQ Server wrote:

> 4.35: How do I find the soundex value of a string?

Is this really sufficiently frequently asked to justify a FAQ entry?

The are an very large class of questions "how do I do foo?" for which 
the answer is "get a module that does foo from CPAN".



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

Date: Tue, 2 Nov 2004 17:03:01 +0000 (UTC)
From: PerlFAQ Server <comdog@panix.com>
Subject: FAQ 4.62: Why don't my tied hashes make the defined/exists distinction?
Message-Id: <cm8ek5$mfe$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.

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

4.62: Why don't my tied hashes make the defined/exists distinction?

    This depends on the tied hash's implementation of EXISTS(). For example,
    there isn't the concept of undef with hashes that are tied to DBM*
    files. It also means that exists() and defined() do the same thing with
    a DBM* file, and what they end up doing is not what they do with
    ordinary hashes.



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

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: Tue, 2 Nov 2004 17:15:11 +0000
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: Global @INC
Message-Id: <vtrk52-125.ln1@osiris.mauzo.dyndns.org>


Quoth William Ahern <william@wilbur.25thandClement.com>:
> How can I globally specify additional @INC paths. Is there a module I can
> edit amongst any Perl library modules--written in perl?

No, you have to rebuild perl. This is on the TODO list :)...

> I've tried setting PERL5LIB in the the global shell startup files in /etc,
> but that doesn't work for perl code started from init.

Errr.... *why* are you starting perl from init? Sounds like a Bad Idea
to me... In any case, you can use -I.

Ben

-- 
perl -e'print map {/.(.)/s} sort unpack "a2"x26, pack "N"x13,
qw/1632265075 1651865445 1685354798 1696626283 1752131169 1769237618
1801808488 1830841936 1886550130 1914728293 1936225377 1969451372
2047502190/'                                                 # ben@morrow.me.uk


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

Date: 2 Nov 2004 09:05:14 -0800
From: john_pataki@yahoo.com
Subject: hash key order different in perl 5.8?
Message-Id: <1099415114.820420.23120@f14g2000cwb.googlegroups.com>

I just updated my perl version to 5.8 from 5.6.1 and with no code
change in the area of my list creation.... but I get a different order
now...

Here is the code I believe to be in question:


my @details = ((basename($fi)),$na,$nu,$ve,$ls,$st);
push @{$LIB_ITEMS{$pr}{$li}{$asm++}},@details;

 ... later in my code...

foreach my $asm (keys %{$LIB_ITEMS{$prj}{$lib}}) {
 ...
}


I know that you cannot rely on a specific order from keys stored in a
hash -- however -- I did get a consistant order one way in 5.6.1 now I
get a consistant yet different order now in 5.8

It appeared that it was alpabetical (for $asm) in 5.6.1. and now
reverse alphabetical in 5.8

? anyone else notice this ?

I can just use a sort command with my keys -- just thought it was odd
that it was different.

John



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

Date: Tue, 02 Nov 2004 17:14:00 GMT
From: Ala Qumsieh <notvalid@email.com>
Subject: Re: hash key order different in perl 5.8?
Message-Id: <sfPhd.37769$QJ3.9507@newssvr21.news.prodigy.com>

john_pataki@yahoo.com wrote:

> I know that you cannot rely on a specific order from keys stored in a
> hash -- however -- I did get a consistant order one way in 5.6.1 now I
> get a consistant yet different order now in 5.8

Correct.

> It appeared that it was alpabetical (for $asm) in 5.6.1. and now
> reverse alphabetical in 5.8
> 
> ? anyone else notice this ?

Yes.

> I can just use a sort command with my keys -- just thought it was odd
> that it was different.

No it's not really odd, since it is documented. From 'perldoc -f keys':

              The actual random order is subject to
              change in future versions of perl, but it is
              guaranteed to be the same order as either the
              "values" or "each" function produces ...

It is probably the side-effect of some internal optimization.

--Ala


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

Date: Tue, 02 Nov 2004 17:47:14 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: hash key order different in perl 5.8?
Message-Id: <cm8gu9$cdv$1@sun3.bham.ac.uk>



Ala Qumsieh wrote:
> john_pataki@yahoo.com wrote:
> 
>> I know that you cannot rely on a specific order from keys stored in a
>> hash -- however -- I did get a consistant order one way in 5.6.1 now I
>> get a consistant yet different order now in 5.8
> 
> Correct.

Yes, as of 5.8.0 there's a new algorithm.

See perl58delta.

http://search.cpan.org/~nwclark/perl-5.8.5/pod/perl58delta.pod#Performance_Enhancements

As of 5.8.1 the order is no longer consitant (to resist a particular 
class of DoS attack).

See perl581delta.

http://search.cpan.org/~nwclark/perl-5.8.5/pod/perl581delta.pod#Hash_Randomisation



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

Date: 2 Nov 2004 05:07:25 -0800
From: ronny.kluge@barmenia.de (Ronny Kluge)
Subject: List all Printer-Driver on a Mashine
Message-Id: <207553d4.0411020507.1d98b41a@posting.google.com>

Hallo together,

i want to get a List of all Printer Drivers, wich are installed on a Mashine.

Do you know how to do this with Perl? 

Thanxs, Greets, Ronny.


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

Date: Tue, 02 Nov 2004 09:09:42 -0500
From: Laura <lwt0301@bellsouth.net>
Subject: Re: List all Printer-Driver on a Mashine
Message-Id: <10of1uqre7suhc0@news.supernews.com>

Ronny Kluge wrote:

> Hallo together,
> 
> i want to get a List of all Printer Drivers, wich are installed on a
> Mashine.
> 
> Do you know how to do this with Perl?
> 
> Thanxs, Greets, Ronny.

I do it like this:

@drivers = MashineDrivers('printers');
print for @drivers;

I have written the implementation for this function in the margins of my
'Perl Cookbook' which I have unfortunately misplaced.


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

Date: Tue, 2 Nov 2004 06:37:32 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: List all Printer-Driver on a Mashine
Message-Id: <slrncoevsc.2io.tadmc@magna.augustmail.com>

Ronny Kluge <ronny.kluge@barmenia.de> wrote:


> i want to get a List of all Printer Drivers, wich are installed on a Mashine.


It is the job of the Operating System to manage device drivers.


> Do you know how to do this with Perl? 


If you know how your *OS* can do this, then it is very likely
that you can launch that OS function from Perl.

Ask in an OS-specific newsgroup how to list the drivers, then come
back here if you can't get it to run from Perl.


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


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

Date: Mon, 1 Nov 2004 17:56:59 +0000
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: modifying hash key (dispatch table)
Message-Id: <b0ai52-vs4.ln1@osiris.mauzo.dyndns.org>


Quoth Arndt Jonasson <do-not-use@invalid.net>:
> 
> Ben Morrow <usenet@morrow.me.uk> writes:
> > Quoth Arndt Jonasson <do-not-use@invalid.net>:
> > > 
> > > Tad McClellan <tadmc@augustmail.com> writes:
> > > > My personal style is to never use ampersands on sub calls, whether
> > > > called direct or via a coderef, I always use parens on sub calls 
> > > > instead (even when they take no args).
> > > 
> > > I was going to ask whether that was true even for 'eof', since the
> > > calls "eof" and "eof()" behave differently, but I suppose 'eof' is not
> > > a subroutine, but a built-in function.
> > 
> > Can you give an example of that?
> > 
> > Builtins behave exactly as though they were user-defined functions.

OK, '[Calls to b]uiltins ... [calls to ] user-defined functions[, with
the exception of those for which prototype 'CORE::foo' returns undef]'.

:)

> You can do \&foo and get a reference to the subroutine foo, but apparently
> that can't be done with builtins. (Maybe it can in perl 5.8, but I'm on
> 5.005 still.)

Yes, you are correct that a ref cannot be taken to a builtin.

Ben

-- 
$.=1;*g=sub{print@_};sub r($$\$){my($w,$x,$y)=@_;for(keys%$x){/main/&&next;*p=$
$x{$_};/(\w)::$/&&(r($w.$1,$x.$_,$y),next);$y eq\$p&&&g("$w$_")}};sub t{for(@_)
{$f&&($_||&g(" "));$f=1;r"","::",$_;$_&&&g(chr(0012))}};t    # ben@morrow.me.uk
$J::u::s::t, $a::n::o::t::h::e::r, $P::e::r::l, $h::a::c::k::e::r, $.


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

Date: 2 Nov 2004 09:15:01 -0800
From: bjarne@gmail.com (Bjarne Stroustrup)
Subject: Re: Perl is awsome!
Message-Id: <1fd97be1.0411020915.51073077@posting.google.com>

Bjarne Stroustrup <bs@research.att.com> wrote in message news:<10ode051dl0hq9a@news.supernews.com>...
> Scalars, arrays, hashes, references, modules...
> Perl is so cool!  Why didn't I think of it?
> 
> How about Perl++?
> 
> B

That message is a fake. It did not come from me

  -- Bjarne Stroustrup; http://www.research.att.com/~bs


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

Date: Tue, 02 Nov 2004 13:09:52 -0000
From: Bjarne Stroustrup <bs@research.att.com>
Subject: Perl is better than C++ will ever be
Message-Id: <10of1p0p24ro865@news.supernews.com>

But at least I have an unægtelig højereståewebsite!

http://www.research.att.com/~bs/homepage.html

http://www.wall.org/~larry/

I have been playing Perl all night.
I think this hash thing is getting
to my head.

B 




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

Date: Tue, 02 Nov 2004 08:31:54 -0500
From: "sirclif" <cdclark@scatcat.fhsu.edu>
Subject: Re: Perl is better than C++ will ever be
Message-Id: <b3884a1ffe67001ef921213975c1bea2@localhost.talkaboutprogramming.com>

????????



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

Date: 2 Nov 2004 13:52:13 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Perl is better than C++ will ever be
Message-Id: <Xns95955A3C137B9asu1cornelledu@132.236.56.8>

"sirclif" <cdclark@scatcat.fhsu.edu> wrote in 
news:b3884a1ffe67001ef921213975c1bea2@localhost.talkaboutprogramming.com:

> ????????

He is a troll. Please do not feed the troll. If you must do something, 
please forward the message (with all headers included) to 
abuse@supernews.com.

Sinan.


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

Date: Tue, 2 Nov 2004 13:10:14 -0500
From: "daniel kaplan" <nospam@nospam.com>
Subject: Re: Proper quitting
Message-Id: <1099419073.569152@nntp.acecape.com>

"Gregory Toomey" <nospam@bigpond.com> wrote in message
news:2unr0sF2ctk3bU1@uni-berlin.de...
> If you're using a real operating system (linux/bsd/unix) you dont need to
> free anything after program termination.
>
> The toys that Microsoft makes (I don't call them operating systems) trace
> their heritage back to CP/M http://en.wikipedia.org/wiki/CP/M which were
> nothing more than glorified program loaders.
>
must ask then, what if you were running Perl under Windows?  Although I
cannot see the point, but what if you were?  What would you do?

And no, I am not, but would like to know anyway....




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

Date: 02 Nov 2004 13:00:17 +0100
From: Arndt Jonasson <do-not-use@invalid.net>
Subject: Re: Regular Expression for - \C\R...
Message-Id: <yzd3bzszcj2.fsf@invalid.net>


anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:
> stratus  <gis86508@cissol1.cis.nctu.edu.tw> wrote in comp.lang.perl.misc:
> > I want to know what is the meaning of \C and \R.
> > 
> > for example, if(/^\s*(\C\S+)\s+(\S+)\s+(\S+)\s+(\S+)/i)
> >              if(/^\s*(\R\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/i){
> > 
> > 
> > I cannot find this in the document.
> 
> What document?  Have you looked in perlre?  Search for
> "In addition, Perl defines the following:".

Maybe stratus uses an older version of perl. \S seems to be fairly recent.

For \C, it says:
    \C	Match a single C char (octet) even under Unicode.
	NOTE: breaks up characters into their UTF-8 bytes,
	so you may end up with malformed pieces of UTF-8.
	Unsupported in lookbehind.

But I can't find \R in the doc for perl 5.8 either.


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

Date: 2 Nov 2004 13:52:13 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Regular Expression for - \C\R...
Message-Id: <cm83ed$dhr$1@mamenchi.zrz.TU-Berlin.DE>

Arndt Jonasson  <do-not-use@invalid.net> wrote in comp.lang.perl.misc:
> 
> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:
> > stratus  <gis86508@cissol1.cis.nctu.edu.tw> wrote in comp.lang.perl.misc:
> > > I want to know what is the meaning of \C and \R.
> > > 
> > > for example, if(/^\s*(\C\S+)\s+(\S+)\s+(\S+)\s+(\S+)/i)
> > >              if(/^\s*(\R\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/i){
> > > 
> > > 
> > > I cannot find this in the document.
> > 
> > What document?  Have you looked in perlre?  Search for
> > "In addition, Perl defines the following:".
> 
> Maybe stratus uses an older version of perl. \S seems to be fairly recent.

I suppose you mean "\C".  "\S" is ancient.

> For \C, it says:
>     \C	Match a single C char (octet) even under Unicode.
> 	NOTE: breaks up characters into their UTF-8 bytes,
> 	so you may end up with malformed pieces of UTF-8.
> 	Unsupported in lookbehind.
> 
> But I can't find \R in the doc for perl 5.8 either.

"\R" (which I overlooked the first time) doesn't seem to have a
function in a regex.  under current Perl, perl -le 'print qr/\R/'
simply shows "(?-xism:R)".

Anno


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

Date: Tue, 02 Nov 2004 14:18:35 GMT
From: Mike <dontwannasay@home.com>
Subject: Win32 Advanced Properties
Message-Id: <Xns9595402FDB388dontwannasaycom@216.148.227.77>

Is there any way I can manipulate the extended file properties in Windows 
XP with Perl?  I have about 300 image files from a wedding that I want to 
modify the 'Author' and 'Copyright' fields, and I don't want to have to do 
the select-right-click-etc-etc-etc dance on 300 files.

Any suggestions, pointers, doc refs, etc will be appreciated.

Thanks,
Mike


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

Date: Tue, 02 Nov 2004 09:37:58 -0500
From: Shakotah <shakotah@spymac.com>
Subject: Re: Win32 Advanced Properties
Message-Id: <mMqdnRg-YqVaBhrcRVn-hw@speakeasy.net>

Mike wrote:
> Is there any way I can manipulate the extended file properties in Windows 
> XP with Perl?  I have about 300 image files from a wedding that I want to 
> modify the 'Author' and 'Copyright' fields, and I don't want to have to do 
> the select-right-click-etc-etc-etc dance on 300 files.
> 
> Any suggestions, pointers, doc refs, etc will be appreciated.
> 
> Thanks,
> Mike
Hi,

You should look for a module that can modify the image file properties 
(not filesystem). For a jpg this information (I believe its called EXIF) 
is in the jpeg header, you need a module that will update this information.


Hope to have helped ;-)


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

Date: Tue, 02 Nov 2004 14:40:19 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Win32 Advanced Properties
Message-Id: <n%Mhd.2934$cA4.2291@trnddc01>

Mike wrote:
> Is there any way I can manipulate the extended file properties in
> Windows XP with Perl?  I have about 300 image files from a wedding
> that I want to modify the 'Author' and 'Copyright' fields, and I
> don't want to have to do the select-right-click-etc-etc-etc dance on
> 300 files.
>
> Any suggestions, pointers, doc refs, etc will be appreciated.

I may be mistaken, but I think those "file properites" have nothing to do 
with the file system per se but are attributes of (probably) the JPEG 
format. I would check some JPEG modules.

jue 




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

Date: 2 Nov 2004 15:31:57 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Win32 Advanced Properties
Message-Id: <Xns95956B262E964asu1cornelledu@132.236.56.8>

"Jürgen Exner" <jurgenex@hotmail.com> wrote in
news:n%Mhd.2934$cA4.2291@trnddc01: 

> Mike wrote:
>> Is there any way I can manipulate the extended file properties in
>> Windows XP with Perl?  I have about 300 image files from a wedding
>> that I want to modify the 'Author' and 'Copyright' fields, and I
>> don't want to have to do the select-right-click-etc-etc-etc dance on
>> 300 files.
>>
>> Any suggestions, pointers, doc refs, etc will be appreciated.
> 
> I may be mistaken, but I think those "file properites" have nothing to
> do with the file system per se but are attributes of (probably) the
> JPEG format. I would check some JPEG modules.

Fundamentally, you are correct. EXIF information should be preferred 
rather than OS specific methods.

NTFS does have these alternative streams that can be associated with 
files. The OP might want to look at:

http://tinyurl.com/5ub5n

However, as another poster has also mentioned, I would urge the OP to 
manipulate EXIF information than NTFS alternative streams

-- 
A. Sinan Unur
1usa@llenroc.ude.invalid 
(remove '.invalid' and reverse each component for email address)



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

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


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