[22304] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4525 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 6 21:12:35 2003

Date: Thu, 6 Feb 2003 18:06:41 -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           Thu, 6 Feb 2003     Volume: 10 Number: 4525

Today's topics:
        Controlling order of precedence <racsw@frontiernet.net>
    Re: Controlling order of precedence <jkeen@concentric.net>
    Re: Controlling order of precedence <jeff@vpservices.com>
    Re: Converting a string to time value (seconds since Ep <dominick_more@bluewin.ch>
    Re: Crossposting (was: Fetchrow Question) <mgarrish@rogers.com>
    Re: Generate Postscript Level 2 for Images (Chris Fedde)
    Re: I'm just not getting it... FAQ5 <jkeen@concentric.net>
    Re: I'm just not getting it... FAQ5 <jkeen@concentric.net>
    Re: I'm just not getting it... FAQ5 <glex_nospam@qwest.net>
    Re: I'm just not getting it... FAQ5 <ddunham@redwood.taos.com>
    Re: I'm just not getting it... FAQ5 <krahnj@acm.org>
    Re: I'm just not getting it... FAQ5 <spam@thecouch.homeip.net>
        LWP multipart/form-data with content NOT from file <richard@zync.co.uk>
    Re: Perl scripts utilizing Openview Omniback commands <steven.smolinski@sympatico.ca>
    Re: Perl Template <jkeen@concentric.net>
    Re: Perl Template <spam@thecouch.homeip.net>
    Re: sharing variables <glex_nospam@qwest.net>
    Re: sharing variables <jkeen@concentric.net>
    Re: sharing variables <jkeen@concentric.net>
    Re: sharing variables <glex_nospam@qwest.net>
    Re: string in datei <abigail@abigail.nl>
        threaded perl in rh 8.0 <no_email@none.abc>
        Why no perl function to detect numeric or string? <ekulis@apple.com>
    Re: Why no perl function to detect numeric or string? <uri@stemsystems.com>
    Re: WMI and Perl (Chris Fedde)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 06 Feb 2003 19:54:08 -0500
From: Robert Krueger <racsw@frontiernet.net>
Subject: Controlling order of precedence
Message-Id: <v460tklan4d4c4@corp.supernews.com>

Hi,
  In C++, you can control the order of evaluation in calculations by 
enclosing particular calculations in ().  Everything is then calculated 
from the innermost () to the outermost () so any question of the order of 
precedence can be eliminated.
  I'm just learning Perl by using "Learning Perl, 3rd. Ed.", and I see no 
way to do this in Perl.  Is this correct?

Thanks,
Robert


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

Date: 07 Feb 2003 01:04:31 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: Controlling order of precedence
Message-Id: <b1v0mv$gad@dispatch.concentric.net>


"Robert Krueger" <racsw@frontiernet.net> wrote in message
news:v460tklan4d4c4@corp.supernews.com...
> Hi,
>   In C++, you can control the order of evaluation in calculations by
> enclosing particular calculations in ().  Everything is then calculated
> from the innermost () to the outermost () so any question of the order of
> precedence can be eliminated.
>   I'm just learning Perl by using "Learning Perl, 3rd. Ed.", and I see no
> way to do this in Perl.  Is this correct?
>
No, it's not correct.  Cf. Learning Perl (3rd ed), p 31:
"You can override the default precedence order by using parentheses.
Anything in parentheses is completely computed before the operator outside
of the parentheses is applied (just like you learned in math class)."




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

Date: Thu, 06 Feb 2003 17:03:31 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Controlling order of precedence
Message-Id: <3E4305E3.4050108@vpservices.com>

Robert Krueger wrote:

> Hi,
>   In C++, you can control the order of evaluation in calculations by 
> enclosing particular calculations in ().  Everything is then calculated 
> from the innermost () to the outermost () so any question of the order of 
> precedence can be eliminated.
>   I'm just learning Perl by using "Learning Perl, 3rd. Ed.", and I see no 
> way to do this in Perl.  Is this correct?

What happened when you tried? For example this would have taken you alot 
less typing than phrasing your question in English and sending it to the 
newsgroup:

   % perl -e 'print 3*2+7'
   13
   % perl -e 'print 3*(2+7)'
   27

-- 
Jeff



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

Date: Fri, 7 Feb 2003 01:17:04 +0100
From: "Dominick Moré" <dominick_more@bluewin.ch>
Subject: Re: Converting a string to time value (seconds since Epoch)
Message-Id: <3e42f9d1$1_5@news.bluewin.ch>

You can use ctime and save it as a long value or timelocal to save localtime
array.

Dominick Moré

"Bart Lateur" <bart.lateur@pandora.be> schrieb im Newsbeitrag
news:lp024vodm8rq6j60mthdjoomgvdavv023h@4ax.com...
> Flynn wrote:
>
> >I've scoured every resource I have, and although it's easy enough to turn
a
> >time value into a string with the help of the localtime() function, I
can't
> >figure out how to do it the other way round. Basically, I need to convert
a
> >date typed on a form, and store it as a value. How ????
>
> Date::Calc. Time::Local.
>
> For the latter, see here:
>
> <http://perlmonks.org/index.pl?node_id=232687>
>
> --
> Bart.




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

Date: Fri, 07 Feb 2003 00:08:43 GMT
From: "mgarrish" <mgarrish@rogers.com>
Subject: Re: Crossposting (was: Fetchrow Question)
Message-Id: <fOC0a.286210$pDv.271439@news04.bloor.is.net.cable.rogers.com>


<Andrew Lee> wrote in message
news:qjh54v05dijgk4btn2dank2eden7g85pbf@4ax.com...
>
> *plonk*
>

Ahh, the sweet lowing of the herd...




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

Date: 06 Feb 2003 23:35:29 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Generate Postscript Level 2 for Images
Message-Id: <3e42f141$0$17992$75868355@news.frii.net>

    In article <b1u336$dea5@eccws12.dearborn.ford.com>,
    Srikant Vaishampayan <srikantvaishampayan@hotmail.com> wrote:
    >Hi,
    >
    >I have a report containing the following features:
    >

Interesting description of constraints deleted.


    >Hence, I want to include Boxes, Lines, Fonts and JPEG/GIF/PNG
    >Images in the report and the output should be a PostScript
    >(Level 2) file.
    >

There is nothing special about postscript that requires a module to generate
it.  Normal code generation techniques can be enough.  That said there may
be some other intermediate format that can be generated that will
potentialy make your job easier.    Back in the olden days I generated
reports in postscript by first generating troff and then processing it in a
pipeline.

Having said all this, I'll also point out that there are several
modules on CPAN that appear to address this problem space.  Perhaps
one of them would work for you?

    >Please send your response to srikantvaishampayan@hotmail.com

Unfortunately I'm not going to mail my response. Sorry.
-- 
    This space intentionally left blank


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

Date: 06 Feb 2003 23:15:27 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: I'm just not getting it... FAQ5
Message-Id: <b1uqaf$akh@dispatch.concentric.net>


"rab" <richardbriggs@att.com> wrote in message
news:900b7105.0302061331.118ec7b2@posting.google.com...
>
>
> I'm hitting a wall on how to match the pattern (grok-3.+) and delete
> those lines containing it, while simultaneously replacing those lines
> in that same place in the file with the new grok-3 modified single
> line.
>
>
> any ideas?
>
Take a look at Mark-Jason Dominus' Tie::File module, available from CPAN or
standard in 5.8.  It enables you to treat the lines of a file as if they
were elements in an array ... in which case you could probably use a
'splice' function to achieve your goal.




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

Date: 06 Feb 2003 23:36:46 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: I'm just not getting it... FAQ5
Message-Id: <b1urie$akk@dispatch.concentric.net>


"James E Keenan" <jkeen@concentric.net> wrote in message
news:b1uqaf$akh@dispatch.concentric.net...
>
> "rab" <richardbriggs@att.com> wrote in message
> news:900b7105.0302061331.118ec7b2@posting.google.com...
> >
> >
> > I'm hitting a wall on how to match the pattern (grok-3.+) and delete
> > those lines containing it, while simultaneously replacing those lines
> > in that same place in the file with the new grok-3 modified single
> > line.
> >
> >
> > any ideas?
> >
> Take a look at Mark-Jason Dominus' Tie::File module, available from CPAN
or
> standard in 5.8.  It enables you to treat the lines of a file as if they
> were elements in an array ... in which case you could probably use a
> 'splice' function to achieve your goal.
>
If I understand your objective, the solution was even simpler than I
thought:

use Tie::File;

my $file = 'grok.txt';

my @arr = ();
tie @arr, 'Tie::File', $file or die "Could not tie $file: $!";
for (my $i=0; $i<=$#arr; $i++) {
        my $temp = $arr[$i];
        $arr[$i] = 'grok-3 NEW TEXT HERE' if ($temp =~ /^grok-3/);
}
untie @arr;




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

Date: Thu, 06 Feb 2003 17:42:43 -0600
From: Jeff D Gleixner <glex_nospam@qwest.net>
Subject: Re: I'm just not getting it... FAQ5
Message-Id: <2oC0a.91$yr3.65618@news.uswest.net>

rab wrote:
> well...perldoc -q "delete a line in a file"   was no help
> faq5   no help.
> 
> 
> I *do* need to delete a line in a file that matches a certain regex
> pattern...
> 
> 
> example:
> 
> I need a script to take a text file that looks like this:
> 
> 
> grok-1
> grok-1c text text text text
> grok-2 text text text text
> grok-2a text text text text
> grok-2c text text text text
> grok-3  text text text text
> grok-3a text text text text
> grok-3b text text text text
> grok-3c text text text text
> grok-5 text text text text
> grok-9a text text text text
> grok-4z text text text text
> 
> and change it into a file that looks like this:
> 
> 
> grok-1 text text text text
> grok-1c text text text text
> grok-2 text text text text
> grok-2a text text text text
> grok-2c text text text text
> grok-3 NEW TEXT HERE
> grok-5 text text text text
> grok-9a text text text text
> grok-4z text text text text
> 
> I'm hitting a wall on how to match the pattern (grok-3.+) and delete
> those lines containing it, while simultaneously replacing those lines
> in that same place in the file with the new grok-3 modified single
> line.
> 
> It would be easy to strip the lines out by opening the file for
> reading and
> writing all but the matching lines to a temp file  (next if /grok-3/;)
> 
> It would be easy to open the temp file up and then scan down to the
> line before and after I deleted the "grok-3" lines, but the files I'm
> working with aren't always in order so grok-3 may be followed by
> grok-9 or nothing at all.
> 
> It also would be easy if I was replacing the same number of lines
> (which I'm not) by using s///
> 
> but I have to test if there are any "grok-3" lines... and no matter
> how many are in there (0 or more) I need to replace them with only one
> grok-3 line.
> 
> any ideas?

open(D, "<datafile") or die "..";
open(TMP, ">tmpfile") or die "..";
my $found=0;
my $new_data='some junk';
while (<D>)
{
	if (/^grok-3/)
	{
		if (!$found)
		{
			print TMP $new_data, "\n";
			$found++;
		}
		next;
	}
	print TMP;
}
close (TMP); close(D);
rename ("./tmpfile", "./datfile") or die "...";


If you don't need to put it in the same place as the first occurance, just
ignore it and append it when you're finished.
while (<D>)
{
	next if /^grok-3/;
	print TMP;
}
print TMP $new_data, "\n";

Could also do a grep -v for the pattern on the file, into a tmp file, append 
the line, rename.
` grep -v '^grok-3' datafile > tmpfile`;
open (TMP, ">>tmpfile") or die ".."
print TMP "new info\n";
rename(...);


Many ways to go about it.



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

Date: Thu, 06 Feb 2003 23:52:31 GMT
From: Darren Dunham <ddunham@redwood.taos.com>
Subject: Re: I'm just not getting it... FAQ5
Message-Id: <3zC0a.2307$bD6.191798475@newssvr21.news.prodigy.com>

rab <richardbriggs@att.com> wrote:
> I'm hitting a wall on how to match the pattern (grok-3.+) and delete
> those lines containing it, while simultaneously replacing those lines
> in that same place in the file with the new grok-3 modified single
> line.

Is it possible for there to be two discontiguous blocks of grok-3 lines
in the file?

my $grok_3_printed = 0;
while (<>)
{
  if (/^grok-3/)
  {
     next if ($grok_3_printed);
     print "grok-3 NEW DATA HERE\n";
     $grok_3_printed = 1;
  }
  print;
}

-- 
Darren Dunham                                           ddunham@taos.com
Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >


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

Date: Thu, 06 Feb 2003 23:57:14 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: I'm just not getting it... FAQ5
Message-Id: <3E42F63B.F60D4A19@acm.org>

rab wrote:
> 
> well...perldoc -q "delete a line in a file"   was no help
> faq5   no help.
> 
> I *do* need to delete a line in a file that matches a certain regex
> pattern...
> 
> example:
> 
> I need a script to take a text file that looks like this:
> 
> grok-1
> grok-1c text text text text
> grok-2 text text text text
> grok-2a text text text text
> grok-2c text text text text
> grok-3  text text text text
> grok-3a text text text text
> grok-3b text text text text
> grok-3c text text text text
> grok-5 text text text text
> grok-9a text text text text
> grok-4z text text text text
> 
> and change it into a file that looks like this:
> 
> grok-1 text text text text
> grok-1c text text text text
> grok-2 text text text text
> grok-2a text text text text
> grok-2c text text text text
> grok-3 NEW TEXT HERE
> grok-5 text text text text
> grok-9a text text text text
> grok-4z text text text text
> 
> I'm hitting a wall on how to match the pattern (grok-3.+) and delete
> those lines containing it, while simultaneously replacing those lines
> in that same place in the file with the new grok-3 modified single
> line.

perl -i.bak -0777pe's/(^grok-3.*\n)+/grok-3 NEW TEXT HERE\n/m' yourfile


John
-- 
use Perl;
program
fulfillment


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

Date: Thu, 06 Feb 2003 19:12:51 -0500
From: Mina Naguib <spam@thecouch.homeip.net>
Subject: Re: I'm just not getting it... FAQ5
Message-Id: <7SC0a.11809$YH4.38341@wagner.videotron.net>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

rab wrote:
| well...perldoc -q "delete a line in a file"   was no help
| faq5   no help.
|
|
| I *do* need to delete a line in a file that matches a certain regex
| pattern...
|
|
| example:
|
| I need a script to take a text file that looks like this:
|
|
| grok-1
| grok-1c text text text text
| grok-2 text text text text
| grok-2a text text text text
| grok-2c text text text text
| grok-3  text text text text
| grok-3a text text text text
| grok-3b text text text text
| grok-3c text text text text
| grok-5 text text text text
| grok-9a text text text text
| grok-4z text text text text
|
| and change it into a file that looks like this:
|
|
| grok-1 text text text text
| grok-1c text text text text
| grok-2 text text text text
| grok-2a text text text text
| grok-2c text text text text
| grok-3 NEW TEXT HERE
| grok-5 text text text text
| grok-9a text text text text
| grok-4z text text text text
|
| I'm hitting a wall on how to match the pattern (grok-3.+) and delete
| those lines containing it, while simultaneously replacing those lines
| in that same place in the file with the new grok-3 modified single
| line.

As with all things perl, TIMTOWTDI (there is more than once way to do it).

Here's one of them:

### cut here ###
$newgrok = "grok-3 I am the new stuff\n";

while (<>) {
	undef $newgrok if (s/^grok-3.+/$newgrok/s);
	print;
}
### cut here ###

Best of luck.

-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+QvoDeS99pGMif6wRAtNsAKCrKdU/wwJ34ZDzrgIzMHJX+mxcJgCgxlvW
wwalcG17RDuANHXgIHZpGrc=
=nSRu
-----END PGP SIGNATURE-----



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

Date: Thu, 06 Feb 2003 23:51:53 +0000
From: "Richard Gration" <richard@zync.co.uk>
Subject: LWP multipart/form-data with content NOT from file
Message-Id: <20030206.235153.165344818.2358@richg.zync>

Hi all,

It says in the docs for HTTP::Request::Common that you can generate a
Request Object thusly:

POST 'http://some.url.tld/cgi-bin/some_old_rot.cgi'
	Content_Type	=>	'form-data',
	Content			=> 	[
		thing		=>	whatsit,
		foo			=>	bar,
		myfile		=>	[$file,$filename]
	];

The array ref which is the last entry in the Content list specifies the
file upload bit of the POST.

It also says in the docs that you should "Use an "undef" as $file value
if you want to specify the content directly." But it never mentions
how to do this (specify the content directly). Now obviously I can roll
my own multipart/form-data content, but that's not the point!

Does anyone know how to set the content for the file upload bit? I've
tried using $req->content on the returned ref to Request object, but this
replaces the entire contents of the POST. Any ideas anyone??

Cheers
Rich


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


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

Date: Thu, 06 Feb 2003 23:04:10 GMT
From: Steven Smolinski <steven.smolinski@sympatico.ca>
Subject: Re: Perl scripts utilizing Openview Omniback commands
Message-Id: <KRB0a.4211$Pg6.969883@news20.bellglobal.com>

Kevin <kevin_mudd@adp.com> wrote:
> I've been assigned the task of incorporating Omniback commands into
> perl scripts.  Was wondering if anyone here has done the same and
> could help me get started.

I haven't done the same, but with what little information you've given,
this is the best advice I can give:

perldoc -f system

Steve
-- 
Steven Smolinski => http://arbiter.ca/
GnuPG Public Key => http://arbiter.ca/steves_public_key.txt
                 => or email me with 'auto-key' in the subject.
Key Fingerprint  => 08C8 6481 3A7B 2A1C 7C26  A5FC 1A1B 66AB F637 495D


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

Date: 06 Feb 2003 23:17:25 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: Perl Template
Message-Id: <b1uqe5$akb@dispatch.concentric.net>


"karmayogi" <aninmathen@hotmail.com> wrote in message
news:d8fd9d9a.0302061349.1c414ed2@posting.google.com...
> Hi,
>
>    I have a very simple question. This might be very easy for you Perl
> Wizards out there. How do I include a template say HTML:template in my
> perl program, and make sure that a particular version of the template
> say 2.3 is picked up. I ask this because the common repository has two
> versions of the HTML templates, and I want to make sure my program
> picks up the correct version.
>
Partial answer:
If you say something like
   use Module 2.3
it will impose a requirement that any version 2.3 *or later* will be used.
(I don't know how to specify that an *earlier* version of a module is the
only one to use.)




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

Date: Thu, 06 Feb 2003 20:02:24 -0500
From: Mina Naguib <spam@thecouch.homeip.net>
Subject: Re: Perl Template
Message-Id: <AAD0a.12986$YH4.46928@wagner.videotron.net>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

karmayogi wrote:
| Hi,
|
|    I have a very simple question. This might be very easy for you Perl
| Wizards out there. How do I include a template say HTML:template in my
| perl program, and make sure that a particular version of the template
| say 2.3 is picked up. I ask this because the common repository has two
| versions of the HTML templates, and I want to make sure my program
| picks up the correct version.

use HTML::Template 2.3;



-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+QwWgeS99pGMif6wRAr2nAJsFzt3A6yQbHOF+J95y5JrQ+Wt5KACePbiM
7GuDTXkrKPeUKH6PC+IfkB4=
=Wyuq
-----END PGP SIGNATURE-----



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

Date: Thu, 06 Feb 2003 17:22:30 -0600
From: Jeff D Gleixner <glex_nospam@qwest.net>
Subject: Re: sharing variables
Message-Id: <45C0a.76$yr3.63903@news.uswest.net>

Jeff Thies wrote:
>   I have a configuration file with site variables in it, I call it from
> my script:
> 
> require 'variables.var';
> 
> # I also have a module that also needs these variables
> 
> use someModule;
> package someModule; # works without this line
> 
> # someModule has this line:
> require 'variables.var';
> 
> Now, my script can no longer access those variables in variables.var
> 
> Why is that? How do I set this up so my script can use variables.var and
> someModule can also use variables.var? How do I share namespaces?

Scope... Ya probably want to look at

perldoc -f our

or if you're not using perl5.8, look at

perldoc vars




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

Date: 06 Feb 2003 23:23:33 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: sharing variables
Message-Id: <b1uqpl$akf@dispatch.concentric.net>


"Jeff Thies" <cyberjeff@sprintmail.com> wrote in message
news:3E42DE80.4DB04C4F@sprintmail.com...
>   I have a configuration file with site variables in it, I call it from
> my script:
>
> require 'variables.var';

Where is this line appearing in your main package? Above or below 'use
someModule;'?

>
> # I also have a module that also needs these variables
>
> use someModule;
> package someModule; # works without this line

Do you have the two above lines of code in the same file?  If so, then I'm
confused.  Normally you include 'use someModule;' at the top of a script in
order to import the functions coded in package someModule.  'package
someModule' would normally be the first line in the package from which the
functions are being exported.  In other words, these 2 lines of code would
not normally exist in the same file.





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

Date: 06 Feb 2003 23:26:10 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: sharing variables
Message-Id: <b1uqui$ako@dispatch.concentric.net>


"Jeff D Gleixner" <glex_nospam@qwest.net> wrote in message
news:45C0a.76$yr3.63903@news.uswest.net...
>
> Scope... Ya probably want to look at
>
> perldoc -f our
>
> or if you're not using perl5.8, look at
>
> perldoc vars
>
A minor point:  'our' as a scoping mechanism is also available in Perl 5.6.
I've used it quite successfully there.




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

Date: Thu, 06 Feb 2003 18:22:29 -0600
From: Jeff D Gleixner <glex_nospam@qwest.net>
Subject: Re: sharing variables
Message-Id: <jZC0a.95$yr3.69479@news.uswest.net>

James E Keenan wrote:
> "Jeff D Gleixner" <glex_nospam@qwest.net> wrote in message
> news:45C0a.76$yr3.63903@news.uswest.net...
> 
>>Scope... Ya probably want to look at
>>
>>perldoc -f our
>>
>>or if you're not using perl5.8, look at
>>
>>perldoc vars
>>
> 
> A minor point:  'our' as a scoping mechanism is also available in Perl 5.6.
> I've used it quite successfully there.

Right.. D-oah!  Should have said >=5.6.

Thanks
--
Jeff Gleixner
George Carlin Saying of the moment:
	If man evolved from monkeys and apes, why do we still have
	monkeys and apes?



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

Date: 07 Feb 2003 00:06:01 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: string in datei
Message-Id: <slrnb45u39.2tv.abigail@alexandra.abigail.nl>

Helgi Briem (helgi@decode.is) wrote on MMMCDXLVI September MCMXCIII in
<URL:news:3e425c8f.679819348@news.cis.dfn.de>:
<>  
<>  No, but if someone posts to an international forum
<>  in a language other than English, he will have to be 
<>  philosophical about the fact that he is less likely to 
<>  receive a useful answer.


Oh, most certainly. But if a person isn't able to even formulate his
question in English, he or she is even less likely to receive a useful
answer. 

My preferred language of communication is English as well. But theres
a significant difference between a preference and trying to mandate
something.


Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$==-2449231+gm_julian_day+time);do{until($=<$#r){$_.=$r[$#r];$=-=$#r}for(;
!$r[--$#r];){}}while$=;$,="\x20";print+$_=>September=>MCMXCIII=>=>=>=>=>=>=>=>'


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

Date: Thu, 06 Feb 2003 23:34:06 GMT
From: joe dekk <no_email@none.abc>
Subject: threaded perl in rh 8.0
Message-Id: <3E42F0EB.6070108@none.abc>

When I tried to install DBI on redhat 8.0
it complains that perl 5.8.0 is compiled with threading
enabled and gave me warnings about not using threads
on production environment.

Should I ignore the warnings since none of my perl programs will use 
thread?  Is there any bad consequences for using this perl
even if I won't write any threaded perl?  I can compile
perl and overwrite red hat version but I prefer not doing it.

Thanks in advance



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

Date: Thu, 06 Feb 2003 17:27:07 -0800
From: Ed Kulis <ekulis@apple.com>
Subject: Why no perl function to detect numeric or string?
Message-Id: <BA684B6B.5D35%ekulis@apple.com>

Hi,

I'm curious philosophically, why is perl missing a way to find out if a
variable is numeric or string?

Perl must do it internally to find out if a "==" or an "eq" operation is
valid.

Is the type in the symbol table?

If perl can't do something there's usually some fundamental reason.

-ed

On 2/3/03 2:34 AM, in article b1lgj2$afr$1@mamenchi.zrz.TU-Berlin.DE, "Anno
Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote:

> Peter Valdemar Mřrch <peter@morch.com> wrote in comp.lang.perl.misc:
>> Oh, Anno, I like your solution _so_ much better.... However, the no
>> warnings you suggest is necessary to be on the safe side if I 'use
>> warnings' somewhere else. So - in summary:
> 
> I don't see the need to disable other warnings, but one should make
> sure 'numeric' is the only FATAL one in the scope.
> 
>   use warnings NONFATAL => 'all', FATAL => 'numeric'
> 
> should do that.  If other warnings are triggered by the code, the user
> should see them if they are enabled.
> 
>> sub is_numeric {
>>   no warnings;
>>   use warnings FATAL => 'numeric';
>>   return defined eval { $_[ 0] == 0 };
>> }
>> 
>> Could we put this in the FAQ? It is so much more elegant than what is
>> there now.
> 
> It has another problem.  If "is_numeric( $x)" is called, and $x is
> a tied (or otherwise magic) variable, other fatal errors could happen
> which would be veiled by eval().  Likewise if $x contains an object
> that has "0+" (nummification) overloaded.
> 
> To catch these cases we'd have to go back to checking $@ after the eval().
> 
> Anno



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

Date: Fri, 07 Feb 2003 01:53:49 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Why no perl function to detect numeric or string?
Message-Id: <x71y2kj1oy.fsf@mail.sysarch.com>

>>>>> "EK" == Ed Kulis <ekulis@apple.com> writes:

don't top post!

  EK> I'm curious philosophically, why is perl missing a way to find out if a
  EK> variable is numeric or string?

because there is (almost) no need for it.

  EK> Perl must do it internally to find out if a "==" or an "eq" operation is
  EK> valid.

sure, it has access to the *_OK flags in the SV. you can get at them
with some modules.

  EK> If perl can't do something there's usually some fundamental reason.

like no need for it. perl converts as needed and the coder shouldn't
care.

<snip of full quote>

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org
Damian Conway Perl Classes - January 2003 -- http://www.stemsystems.com/class


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

Date: 06 Feb 2003 23:40:49 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: WMI and Perl
Message-Id: <3e42f281$0$17992$75868355@news.frii.net>

In article <3e42858b$1@ec-nntp.>,
Hisham Mohamed <hisham.mohamed@@N0-spam.engelhard.com--NoSpam> wrote:
>Hi all,
>
>I'm trying to do 2 things with WMI. First, I want to dump all the hardware
>and software inventory info from a particular computer, preferably remotely.
>Second, I'm trying to modify the TCP/IP settings for the network adapter
>(i.e. configure DHCP, and remove Novell Client).
>
>My problem has been finding examples or CLEAR documentation on how to do
>this in Perl. Any help would be greatly appreciated. Thanks.
>

It's hard to see how perl can or cannot help with this.  first what is WMI?
second does it provide some kind of API. third is that api available in
some format that can be attacked using perl.  Maybe you have answers to
some of these questions?

-- 
    This space intentionally left blank


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

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.  

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


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