[12360] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5960 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 11 10:07:30 1999

Date: Fri, 11 Jun 99 07:01:28 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 11 Jun 1999     Volume: 8 Number: 5960

Today's topics:
    Re: holding shell output in perl (Steve .)
    Re: holding shell output in perl <gellyfish@gellyfish.com>
    Re: how do i refresh frames from perl? <office@asc.nl>
        How to write search engine like yahoo? <wilson33@hongkong.com>
        if (my $a=1) { } print $a; Why do i get undef an not "1 <janning@vygen.de>
    Re: Interpolation Question <jdf@pobox.com>
        Linus Torvalds and Carmen Electra? <john.bjorgen@cplc.com>
    Re: Linus Torvalds and Carmen Electra? (I R A Aggie)
    Re: MIcrosofts Attack on Perl (Scott McMahan)
    Re: MIcrosofts Attack on Perl (Chris Nandor)
    Re: MIcrosofts Attack on Perl <jdf@pobox.com>
    Re: MIcrosofts Attack on Perl (Chris Nandor)
        MS Visual SourceSafe Automation in PERL ? <Jens.Rock@genius.de>
    Re: MS Visual SourceSafe Automation in PERL ? <jdf@pobox.com>
    Re: OLE reference (Scott McMahan)
        Perl to control Ascend router <jbleasdale@rmplc.co.uk>
    Re: Please Help!! <wyzelli@yahoo.com>
        Problems with mod building. All Help Appreciated paul.barker@orange.co.uk
        problems with specific words in text field <elkins@tcntr.dyniet.com>
        Verifying date data <thollowe@opentext.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Fri, 11 Jun 1999 13:30:34 GMT
From: syarbrou@nospam.enteract.com (Steve .)
Subject: Re: holding shell output in perl
Message-Id: <37610f07.58799234@news.enteract.com>

Thanks.  That sounds like a good possible solution.  However that
would require the user to wait till it was finished before showing the
output.  I was hoping, if possible, to modify and output the data the
system call is making as it happens.

Steve


On 10 Jun 1999 22:22:17 -0000, Jonathan Stowe
<gellyfish@gellyfish.com> wrote:

>On Thu, 10 Jun 1999 18:49:18 GMT Steve . wrote:
>> I have a perl script that calls rdist to do a system copy.  RDIST
>> outputs things as it goes along to the screen.  I want that output to
>> be caught by the perl script before it hits the screen and modified
>> per my instructions.  How do you catch the output being displayed by a
>> system call?  Thanks.
>> 
>
>You should look for:
>
>  `STRING`
>
>or
>
>  qx/STRING/
>
>in the perlop manpage.
>
>/J\



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

Date: 11 Jun 1999 14:37:53 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: holding shell output in perl
Message-Id: <37611131@newsread3.dircon.co.uk>

Steve . <syarbrou@nospam.enteract.com> wrote:
> On 10 Jun 1999 22:22:17 -0000, Jonathan Stowe
> <gellyfish@gellyfish.com> wrote:
> 
>>On Thu, 10 Jun 1999 18:49:18 GMT Steve . wrote:
>>> I have a perl script that calls rdist to do a system copy.  RDIST
>>> outputs things as it goes along to the screen.  I want that output to
>>> be caught by the perl script before it hits the screen and modified
>>> per my instructions.  How do you catch the output being displayed by a
>>> system call?  Thanks.
>>> 
>>
>>You should look for:
>>
>>  `STRING`
>>
>>or
>>
>>  qx/STRING/
>>
>>in the perlop manpage.
>>

> Thanks.  That sounds like a good possible solution.  However that
> would require the user to wait till it was finished before showing the
> output.  I was hoping, if possible, to modify and output the data the
> system call is making as it happens.
> 

Then you probably want too look at using open() to read the output
one line at a time:

  perldoc -f open

You will almost certainly want to check out the perlipc manpage as well.

/J\
-- 
"Most big companies don't like you very much, except hotels, airlines
and Microsoft, which don't like you at all" - Bill Bryson


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

Date: Fri, 11 Jun 1999 13:54:40 +0200
From: "Bastiaan S van den Berg" <office@asc.nl>
Subject: Re: how do i refresh frames from perl?
Message-Id: <7jqth8$kcr$1@zonnetje.NL.net>

>You didnt get much reply because this is not really a Perl question -
>it is one that  should be asked in comp.infosystems.www.authoring.cgi
>or preferably  the CGI FAQ -
<http://www.webthing.com/tutorials/cgifaq/html>

have you ever tried posting something there?
i need to confirm my posting , so i did

now , at least 30mins ago , it's still not posted!!!
am i going crazy , or is that newsgroup badly moderated??

--
Bastiaan v/d Berg ; aka buZz
Internet Specialist
Account Software Consultancy
-[ http://www.asc.nl/ ]-[ office@asc.nl ]-
-[ http://huizen.ddsw.nl/bewoners/buzz/ ]-[ buzz@ddsw.nl ]-




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

Date: Fri, 11 Jun 1999 19:34:11 +0800
From: wilson <wilson33@hongkong.com>
Subject: How to write search engine like yahoo?
Message-Id: <3760F433.61FE4F77@netvigator.com>


--------------2F1CFDA6282AB4EC5F3349B3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi, I live in taiwan. I want to write a chinese search engine like
yahoo.
Is Perl as a first choice? Has any web site to teach people how to write
a search engine? Thank you for helping.

--------------2F1CFDA6282AB4EC5F3349B3
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<font size=+1>Hi, I live in taiwan. I want to write a chinese search engine
like yahoo.</font>
<br><font size=+1>Is Perl as a first choice? Has any web site to teach
people how to write a search engine? Thank you for helping.</font></html>

--------------2F1CFDA6282AB4EC5F3349B3--



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

Date: Fri, 11 Jun 1999 12:13:37 +0200
From: Janning Vygen <janning@vygen.de>
Subject: if (my $a=1) { } print $a; Why do i get undef an not "1" ??
Message-Id: <3760E151.60A3B580@vygen.de>

if (my $a=1) {
  <anything>
} 
print $a; 

When I declare a scalar with "my" in an if-condition, it can only be
seen within the following if-block.

the (german) Camel Book says:
"Diese [my] Variablen existieren nur innerhalb des umschlie_enden
Blocks". 
its like:
"These variables exist only in the sourrounding block"

so why belongs $a to the _following block and can not be seen by the
print statement??

Greetings, Janning

<please answer per email, too!>


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

Date: 11 Jun 1999 08:58:07 -0400
From: Jonathan Feinberg <jdf@pobox.com>
To: "Aidan Humphreys" <ahumphr@c-s-k.de>
Subject: Re: Interpolation Question
Message-Id: <m3so7yx5b4.fsf@joshua.panix.com>

"Aidan Humphreys" <ahumphr@c-s-k.de> writes:

> Can someone explain to me how I initiate interpolation? Basically I am
> retrieving a HTML string with embedded 'syntactical variables' from a
> database. I want to then interpolate the variables the program
> context.

If I understand you correctly, then what you're asking is a FAQ,
perlfaq4, "How can I expand variables in text strings?"

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Fri, 11 Jun 1999 07:58:45 -0400
From: "John Bjorgen" <john.bjorgen@cplc.com>
Subject: Linus Torvalds and Carmen Electra?
Message-Id: <7jqtln$3e6$1@gaddy.interpath.net>

They have absolutely nothing in common.
Now that I have everyone's attention - heres's my question -

Does anyone have experience using DBI and DBD::ODBC together to
connect to an MS Access database on a Windows NT machine from a
Linux box? I have heard Easysoft's ODBC-ODBC Bridge makes this possible.
 I would like to confirm that this will work before I invest the time and
money
into trying to configure it.  Also for anyone who has experience, what are
the pitfalls I may face?  Also, when installing DBD::ODBC, what do I give as
the DSN? somthing on the Linux side, or the name of the DSN on the NT side?
I appreciate any feedback I can get.

John Bjorgen





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

Date: 11 Jun 1999 13:13:11 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Linus Torvalds and Carmen Electra?
Message-Id: <slrn7m231h.ue6.fl_aggie@thepentagon.com>

On Fri, 11 Jun 1999 07:58:45 -0400, John Bjorgen <john.bjorgen@cplc.com>, in
<7jqtln$3e6$1@gaddy.interpath.net> wrote:

+ They have absolutely nothing in common.

Good.

+ Now that I have everyone's attention - heres's my question -

[deletia]

Bait-n-switch is illegal in most places. Why not try using a more
on-topic subject line?

James


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

Date: 11 Jun 1999 12:26:34 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <3761007a.0@news.new-era.net>

People forget Microsoft funded the initial Win32 port of Perl.

Microsoft's public support of Perl is wonderful -- Perl is becoming
the universal programming language for all of the significant modern
computing platforms, UNIX flavors and Win32.

Microsoft is taking open source very seriously. It is validating it for
the rest of the stuffed shirts who would otherwise not take it seriously
-- imagine a manager who had been cowering in fear that a hacker was
using Perl on a project suddenly giving him a bonus for showing such
initiative once he reads in TradeRagWeekly that MS has voted in support
of Perl with hard dollars.

This "hijacking" garbage is nonsense -- all they can do is build in
Win32 admin tools to the Win32 version you could not use on any other
platform anyway. I don't think there's much to worry about.

Scott


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

Date: Fri, 11 Jun 1999 12:28:08 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <pudge-1106990828130001@192.168.0.77>

In article <37604888.E297EA75@yahoo.com>, jgrain <jgrain@yahoo.com> wrote:

 ... if you are going to crosspost, crosspost.  This same message was in
clp.modules.  Don't send it twice, send it once.

In article <376048C5.AC18B48F@yahoo.com>, jgrain <jgrain@yahoo.com> wrote:

# What is the current strategy of those at the very top, i.e. those who
# understand, believe and promote open source, particularly in reference
# to its influence on reducing the cost of computing and spreading the net
# of those involved in "serious" computing after the announcement that
# Microsoft will be "hijacking" Perls advantages, for their own commercial
# benefit.

There was not announcement of any hijacking.  You are confused.


# Are people aware of the "negative" consequences of such a move,
# especially in relation to one of Perls core ojectives in relation to
# maintaining the language as "portable"?

Yes.  Perl will in all liklihood become more portable as a result of this
arrangement.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: 11 Jun 1999 09:27:24 -0400
From: Jonathan Feinberg <jdf@pobox.com>
To: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <m3n1y6x3yb.fsf@joshua.panix.com>

scott@aravis.softbase.com (Scott McMahan) writes:

> Microsoft is taking open source very seriously.

Indeed, in the sense that it's the only clear threat (aside from
litigation) to its business.

> This "hijacking" garbage is nonsense -- all they can do is build in
> Win32 admin tools to the Win32 version you could not use on any
> other platform anyway. I don't think there's much to worry about.

How, then, do you explain Sun's recent litigation v. Microsoft
concerning this very issue in the domain of Java VMs?

Just for the sake of full disclosure, I must ask--are you employed by
Microsoft?  Do you have any connection with them that links your best
interest to theirs?

ObPerl: For users of mh/nmh, here's a little program that prints out a
neatly formatted list of all of your unread mail.

    #!/usr/bin/perl -w
    use strict;
    $|++;

    my @flist = `flist -all -recurse -noshowzero`;
    die "flist: $?\n" if $?;

    foreach my $folder (@flist) {
      my ($f, $n) = $folder =~ /^([^\s\+]+)[^h]*has\s*(\d+)/;
      my @scan = `scan +$f`;
      die "scan: $?\n" if $?;
      print "$f:\n";
      for (my $i = @scan - $n; $i < @scan; $i++) {
	my ($msg,$who, $subj) = 
	  $scan[$i] =~ /^(.{4}).{8}(.{17})..(.*)$/;
	printf "  %2d %17s %s\n", $msg, $who, $subj;
      }

    }

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Fri, 11 Jun 1999 13:35:32 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <pudge-1106990935370001@192.168.0.77>

In article <m3n1y6x3yb.fsf@joshua.panix.com>, Jonathan Feinberg
<jdf@pobox.com> wrote:

# Just for the sake of full disclosure, I must ask--are you employed by
# Microsoft?  Do you have any connection with them that links your best
# interest to theirs?

Just for the sake of full disclosure, I mustr ask: are you employed by a
competitor of Microsoft's?  Do you have any connection with any company or
organization that links your best interests against Microsoft's?

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: 11 Jun 1999 14:01:18 +0200
From: Jens Rock <Jens.Rock@genius.de>
Subject: MS Visual SourceSafe Automation in PERL ?
Message-Id: <uwvxbq73l.fsf@genius.de>

Hi folks,

maybe it's an RTFM Question, but I am searching since a lot of time
for the solution of the following Problem.

I want to write a tool in PERL, which scans a VSS Database recursively
for things which I don't want to discuss here.

The Opening of the database works fine, and I can set the startpoint
of the search. Now the next lines are these:

  if ($item->Type == 0) {
    my $feld = $item->Items();
   ...

This returns a hash with a Count entry $feld->{"Count"} (the number of
subitems) which is correct, and an Item entry $feld->{"Item"}, which
is IMHO a simple pointer to the Nowhere.

In VB this object returns an array of VSSItem objects. I think this
should work in PERL too, but how to reference the subobjects ?

Does this work at all ?

Any Trips and Ticks are welcome ;-).


cu

Pete
--
Peter Kremer        (Peter.Kremer@eur.autodesk.com)


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

Date: 11 Jun 1999 09:11:14 -0400
From: Jonathan Feinberg <jdf@pobox.com>
To: Jens Rock <Jens.Rock@genius.de>
Subject: Re: MS Visual SourceSafe Automation in PERL ?
Message-Id: <m3pv32x4p9.fsf@joshua.panix.com>

Jens Rock <Jens.Rock@genius.de> writes:

> This returns a hash with a Count entry $feld->{"Count"} (the number of
> subitems) which is correct, and an Item entry $feld->{"Item"}, which
> is IMHO a simple pointer to the Nowhere.

If you're trying to crack open the black box, you might try

  use Data::Dumper;
  print Dumper($feld);

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: 11 Jun 1999 12:27:51 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: OLE reference
Message-Id: <376100c7.0@news.new-era.net>

> Can anyone please point me to some examples of how to use OLE objects
> for word.  

Use the macro recorder! Word's macro recorder will generate
VBA code showing you exactly what parts of the object
model are used to perform a given action. These can usually
be translated one-for-one into Perl code that uses the
Win32::OLE module.

Scott


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

Date: Fri, 11 Jun 1999 12:33:39 +0100
From: "John B" <jbleasdale@rmplc.co.uk>
Subject: Perl to control Ascend router
Message-Id: <7jqshk$vpc$1@panther.rmplc.co.uk>

This is a bit of a longshot, but has anybody ever tried to automate tasks on
an Ascend P50 or Max4000 router using Perl?

I am hoping to run some connectivity testing from a P50 and need to automate
this and include dialing different numbers (therefore test and reconfigure
on a regular basis). I have managed this on a Cisco 1605 using a mix of Perl
and bash with telnet, but I'm not sure about how to communicate with the
Ascend's "windowed" interface. Has anyone done anything similar to this in
the past?

Cheers,
John
________________________
John Bleasdale
RM Internet for Learning
www.ifl.net





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

Date: Fri, 11 Jun 1999 22:18:21 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Please Help!!
Message-Id: <oA783.17$hR4.7184@vic.nntp.telstra.net>

Tom Phoenix <rootbeer@redcat.com> wrote in message
news:Pine.GSO.4.02A.9906101726290.26349-100000@user2.teleport.com...
> On Thu, 10 Jun 1999 coneliberation@my-deja.com wrote:

(chainsaw buzz)

> Just to be sure, are you asking for free labor? That's not what this
> newsgroup is all about. Even if you were building a website that would
> save millions of handicapped baby seals of color who are suffering from
> AIDS, neglect, and post-nasal drip because their ship was struck by an
> iceberg in war-torn Kosovo, this newsgroup isn't really the place to ask
> for volunteers. (A better way would be to search out volunteer
> organizations through your favorite search engine.)
>

What about Land Rights for Gay Whales?

:^)

Wyzelli




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

Date: Fri, 11 Jun 1999 11:20:30 GMT
From: paul.barker@orange.co.uk
Subject: Problems with mod building. All Help Appreciated
Message-Id: <7jqrdp$d62$1@nnrp1.deja.com>

 Hi all

I am currently trying to install the following mods :

 Digest::MD5 (v 2.01)
 Term::ReadKey (v 2.12)

With both products I run make test and find many unresolved symbol
errors within either MD5.sl and TermReadKey.sl . As these are the
products I am attempting to install, I do not understand what is
happening.

These modules are very urgently required by our developers so any
suggestions would be very gratefully recieved.

BTW system is Perl 5.00503 ON hpux K570 using HP ansi C compiler for
build.

Many thanks

Paul

--
########################################################################
# Paul Barker - Senior Systems Engineer (Technical) - Orange PLC - UK  #
#    The opinions expressed here are my own and may be incorrect.      #
########################################################################


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 11 Jun 1999 09:44:29 -0500
From: "Arie" <elkins@tcntr.dyniet.com>
Subject: problems with specific words in text field
Message-Id: <376112bd@discussions>


I have got some forms that are generated 
dynamically by perl, and for the most part 
they work great.  One problem I am having, 
however, is when the user enters the 
word "action" in the text fields.  For some 
reason the script handles it oddly.  
Everything after, and including, the 
word "action" is eliminated when it is 
written to the database.  Is there any way 
around this problem?  It would be of great 
help if we could actually allow the user to 
enter the word "action"  If you need me to 
post the script just let me know


--Posted from EarthWeb Discussions. http://discussions.earthweb.com



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

Date: Fri, 11 Jun 1999 08:35:54 -0400
From: "Skip Hollowell" <thollowe@opentext.com>
Subject: Verifying date data
Message-Id: <7jqvsd$27p2@enews4.newsguy.com>

I have some data in a text file and I need to verify if the dates are valid
They are in the YYYYMMDD format.  I haven't found any data funtions
that will let me do this.

The offending data should be changed so that if a month is listed as 00,
it changes to 01, and the same for a day of 00.

Any ideas?  Regular expressions just don't seem to be cutting it either.

Skip Hollowell
thollowe 'at' opentext.com




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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 5960
**************************************

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