[25542] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7786 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 15 18:10:37 2005

Date: Tue, 15 Feb 2005 15:10:21 -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, 15 Feb 2005     Volume: 10 Number: 7786

Today's topics:
    Re: Weird Error message <chris@sunderhauf.net>
    Re: Weird Error message (Anno Siegel)
    Re: Weird Error message <phaylon@dunkelheit.at>
    Re: Weird Error message <noreply@gunnar.cc>
    Re: Weird Error message <chris@sunderhauf.net>
    Re: Weird Error message <noreply@gunnar.cc>
    Re: Weird Error message <tony_curtis32@yahoo.com>
    Re: Weird Error message <chris@sunderhauf.net>
    Re: Weird Error message <noreply@gunnar.cc>
    Re: Weird Error message (Anno Siegel)
    Re: Weird Error message (Anno Siegel)
    Re: Weird Error message <noreply@gunnar.cc>
    Re: Weird Error message <matternc@comcast.net>
    Re: Weird Error message <matternc@comcast.net>
        What is endian.h? and how can I get it? <btna@terra.com>
    Re: Win32::OLE check if excel is English or Swedish peter.moller@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 15 Feb 2005 20:15:24 +0100
From: =?ISO-8859-1?Q?Christoph_S=FCnderhauf?= <chris@sunderhauf.net>
Subject: Re: Weird Error message
Message-Id: <cuth8d$6l0$1@online.de>

thank you, thats just what I needed.
But what is interpolation?


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

Date: 15 Feb 2005 19:07:36 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Weird Error message
Message-Id: <cuth9o$m7f$1@mamenchi.zrz.TU-Berlin.DE>

phaylon  <phaylon@dunkelheit.at> wrote in comp.lang.perl.misc:
> Christoph Sünderhauf wrote:
> 
> > print "$termine[($line + 1 )] \n\n";
> 
> Do you want 
> 
>   print $termine[ $line + 1 ]."\n\n";
> 
> ? You may want to read upon interpolation.

What about it?  The interpolation is fine.

Whatever $line contained at the moment, $termine[ $line + 1] was undefined,
that's all.

The message (a warning, not an error message)

    "Use of uninitialized value in concatenation (.) or string..."

is very common and hardly weird.  It describes exactly what happened.

Anno


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

Date: Tue, 15 Feb 2005 20:06:43 +0100
From: phaylon <phaylon@dunkelheit.at>
Subject: Re: Weird Error message
Message-Id: <pan.2005.02.15.19.06.42.122979@dunkelheit.at>

Anno Siegel wrote:

> What about it?  The interpolation is fine.

Hum, maybe I got misleaded by my reading, but I thought the op tried to
print the $line'th + 1 element of $termine. Is interpolation the wrong
term for interpreted symbols (functions, vars) in quoted strings? If so, I
would thank you for clearing me up.

g,phay

-- 
http://www.dunkelheit.at/

The eternal mistake of mankind is to set up an attainable ideal.
                              -- Aleister Crowley



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

Date: Tue, 15 Feb 2005 20:16:57 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Weird Error message
Message-Id: <37f01bF5bj9d8U1@individual.net>

Christoph Sünderhauf wrote:
> 
> Use of uninitialized value in concatenation (.) or string at start.pl 
> line 54.
> 
> Does someone know what this means?
> line 54 is:
> 
> print "$termine[($line + 1 )] \n\n";

It means that the array element you try to print either doesn't exist or 
is undefined. When you include a variable together with other stuff 
between doublequotes, you concatenate the variable value with the other 
stuff into a string. The above is the same as:

     print $termine[($line + 1 )] . " \n\n";

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


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

Date: Tue, 15 Feb 2005 20:29:30 +0100
From: =?ISO-8859-1?Q?Christoph_S=FCnderhauf?= <chris@sunderhauf.net>
Subject: Re: Weird Error message
Message-Id: <cuti3g$7o8$1@online.de>

I have another Question:

when you use \n  with print, you get a new line.
Is there something that makes print continue to write on the same line?


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

Date: Tue, 15 Feb 2005 20:25:04 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Weird Error message
Message-Id: <37f0gjF5benfhU1@individual.net>

Christoph Sünderhauf wrote:
> phaylon wrote:
>> Christoph Sünderhauf wrote:
>>> 
>>> Use of uninitialized value in concatenation (.) or string at start.pl 
>>> line 54.
>>> 
>>> Does someone know what this means?
>>> line 54 is:
>>> 
>>> print "$termine[($line + 1 )] \n\n";
>> 
>> Do you want 
>> 
>>   print $termine[ $line + 1 ]."\n\n";
> 
> thank you, thats just what I needed.

Could somebody possibly explain the expected difference with respect to 
the above warning?

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


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

Date: Tue, 15 Feb 2005 13:24:06 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Weird Error message
Message-Id: <87r7jhaap5.fsf@limey.hpcc.uh.edu>

>> On Tue, 15 Feb 2005 20:29:30 +0100,
>> Christoph Sünderhauf <chris@sunderhauf.net> said:

> I have another Question: when you use \n with print, you get
> a new line.  Is there something that makes print continue to
> write on the same line?

Don't print \n ... ???

You've got to mean something else though, surely?


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

Date: Tue, 15 Feb 2005 20:36:51 +0100
From: =?ISO-8859-1?Q?Christoph_S=FCnderhauf?= <chris@sunderhauf.net>
Subject: Re: Weird Error message
Message-Id: <cutihi$8d5$1@online.de>


> You've got to mean something else though, surely?

Youre right, I meen that it erases the thing before:

I want to print the time
and then  I want to replace the time with the new one.


Is there any way to do this?


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

Date: Tue, 15 Feb 2005 20:31:45 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Weird Error message
Message-Id: <37f0t3F5a23uoU1@individual.net>

Christoph Sünderhauf wrote:
> I have another Question:

Then it would have been appropriate to start a new thread with a new 
subject line.

> when you use \n  with print, you get a new line.

\n represents a newline in Perl whether used in a print() statement or 
elsewhere.

> Is there something that makes print continue to write on the same line?

Don't print newlines...?

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


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

Date: 15 Feb 2005 19:42:42 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Weird Error message
Message-Id: <cutjbi$o36$1@mamenchi.zrz.TU-Berlin.DE>

phaylon  <phaylon@dunkelheit.at> wrote in comp.lang.perl.misc:
> Anno Siegel wrote:
> 
> > What about it?  The interpolation is fine.
> 
> Hum, maybe I got misleaded by my reading, but I thought the op tried to
> print the $line'th + 1 element of $termine. Is interpolation the wrong
> term for interpreted symbols (functions, vars) in quoted strings? If so, I
> would thank you for clearing me up.

Have you tested the OPs code with appropriately set up @termine and $line?
It works as expected.

Once interpolation is triggered by "$" or "@", anything goes.  In particular,
the index in "$array[ ...]" can be any Perl expression, including "$line +
1".  This is how interpolation of arbitrary expressions can be enforced
(or simulated, if you prefer):

    "string @{ [ lc $obj->meth] } more string"

is a common, though not very popular idiom.

Anno


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

Date: 15 Feb 2005 19:48:56 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Weird Error message
Message-Id: <cutjn8$o36$2@mamenchi.zrz.TU-Berlin.DE>

Christoph Sünderhauf  <chris@sunderhauf.net> wrote in comp.lang.perl.misc:
> 
> > You've got to mean something else though, surely?
> 
> Youre right, I meen that it erases the thing before:

If you're printing to a screen, you may want "\r", but the exact effect
would depend on your system and the terminal emulation you're running.

If you're printing to a file, there is no character code to overwrite a
line already written.

Anno


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

Date: Tue, 15 Feb 2005 20:55:23 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Weird Error message
Message-Id: <37f29eF59shc9U1@individual.net>

Christoph Sünderhauf wrote:
> Youre right, I meen that it erases the thing before:
> 
> I want to print the time
> and then  I want to replace the time with the new one.

     local $| = 1;
     print 'Hello!';
     sleep 3;
     print "\015", "Good-bye!\n";;

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


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

Date: Tue, 15 Feb 2005 15:32:23 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: Weird Error message
Message-Id: <b6GdnbjqkejKwY_fRVn-3g@comcast.com>

Christoph Sünderhauf wrote:

> 
> 
> Use of uninitialized value in concatenation (.) or string at start.pl
> line 54.
> 
> 
> Does someone know what this means?
> line 54 is:
> 
> print "$termine[($line + 1 )] \n\n";

It means either that element ($line + 1) of the array
@termine is undefined.

-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

Date: Tue, 15 Feb 2005 15:33:22 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: Weird Error message
Message-Id: <b6GdnbvqkegPwY_fRVn-3g@comcast.com>

Christoph Sünderhauf wrote:

> I have another Question:
> 
> when you use \n  with print, you get a new line.
> Is there something that makes print continue to write on the same line?

Yes.  Don't use \n.  
-- 
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"


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

Date: 15 Feb 2005 11:51:05 -0800
From: "btna" <btna@terra.com>
Subject: What is endian.h? and how can I get it?
Message-Id: <1108497064.993812.146240@z14g2000cwz.googlegroups.com>

Hello all,

I have been trying to install Net::SFTP for 3 weeks now and everytime I
seem to solve an issue, another one comes up. I am running AIX 5.1 and
I found out that the Math::Pari module needed Perl 5.8.0. I am finally
down to compiling Crypt::IDEA. This is the only one I have left to
start compiling Net:SSH.
I get the following when I do "make":

_idea.c:8: endian.h: A file or directory in the path name does not
exist.
make: 1254-004 The error code from the last command is 1.

Any ideas what this include file is for and How can I get it? I don't
have in my system? is ot possible to change it?

Thanks in advance,

BTNA



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

Date: Tue, 15 Feb 2005 19:50:49 GMT
From: peter.moller@gmail.com
Subject: Re: Win32::OLE check if excel is English or Swedish
Message-Id: <uk6p9ha6l.fsf@notvalid.se>

Lambik <lambik@kieffer.nl> writes:

> Brian Helterline wrote:
> 
> > 
> > <peter.moller@gmail.com> wrote in message news:u1xbjqf16.fsf@notvalid.se...
> > >
> > >
> > > Does anyone know how to check if the Excel I'm talking to
> > > with Win32::OLE is english or swedish?
> > 
> > The LanguageSettings Property looks promising: (from Excel VBA)
> > 
> > Returns the LanguageSettings object, which contains information about the
> > language settings in Microsoft Excel. Read-only.
> > expression.LanguageSettings
> > expression    Required. An expression that returns one of the objects in the
> > Applies To list.
> > Example
> > This example returns the language identifier for the language you selected
> > when you installed Microsoft Excel.
> > Set objLangSet = Application.LanguageSettings
> > MsgBox objLangSet.LanguageID(msoLanguageIDInstall)
> > 
> > Translation into Perl left as an exercise ;)
> > 
> > 
> #!/usr/bin/perl
> use strict;
> use Win32::OLE;
> 
> $Win32::OLE::Warn = 3;
> my $Excel = Win32::OLE->GetActiveObject('Excel.Application')||
>   Win32::OLE->new('Excel.Application', 'Quit');
> my $lang = $Excel->LanguageSettings->LanguageID(3);
> print "$lang";

Works wonderful. Thanks alot.
This gave me 1033 on one computer and 1053 on the other.

Some mouse clicking in the MS Object Browser 
gave msoLanguageIDEnglishUS = 1033
and  msoLanguageIDSwedish   = 1053

and thats all I need.

Thanks again.

PMoller



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

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


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