Ken Foskey wrote:
Thanks all,
I did read that about for loops somewhere new there was something. I
wonder how many times I have corrupted stuff with the expectation of
having a copy?*
I always make that mistake 'if( $a = 10 ) {' that is why I always 'use
warnings' and, most importantly, correc
Thanks all,
I did read that about for loops somewhere new there was something. I
wonder how many times I have corrupted stuff with the expectation of
having a copy?*
I always make that mistake 'if( $a = 10 ) {' that is why I always 'use
warnings' and, most importantly, correct the code. Pet peev
On Aug 20, 11:51 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote:
> Paul Lalli wrote:
> > $array[0] = substr( $_, 256, 6 );
> > {
> >no warnings 'numeric';
>
> That would better be:
>
> no warnings qw/numeric uninitialized/;
>
> to cover undefined array elements.
>
> >printf "%06d", $
Paul Lalli wrote:
On Aug 20, 10:47 am, [EMAIL PROTECTED] (Ken Foskey) wrote:
Is there a 'better' way to do this.
Well, if you're sure you know what you're doing, you could just turn
the warning off in the specific scope where you don't want it. I
mean, it's a warning. If you're comfortable w
Ken Foskey wrote:
I have a piece of code that I am assured works and I cannot see why it
would. Code is supposed to force undefined, zero and all space to
numeric zero to stop printf being undefined.
foreach my $value (@array) {
if( ! $value or $value = " " ) {
---
On Aug 20, 10:47 am, [EMAIL PROTECTED] (Ken Foskey) wrote:
> I have a piece of code that I am assured works
Assured by whom?
> and I cannot see why it would.
It doesn't.
> Code is supposed to force undefined, zero and all space to
> numeric zero to stop printf being undefined.
>
> foreach my
- Original Message -
From: "Ken Foskey" <[EMAIL PROTECTED]>
Newsgroups: perl.beginners
To: "beginners perl"
Sent: Monday, August 20, 2007 10:47 AM
Subject: modification
I have a piece of code that I am assured works and I cannot see why it
would. Code is supposed to force undefine
On 8/20/07, Ken Foskey <[EMAIL PROTECTED]> wrote:
>
> I have a piece of code that I am assured works and I cannot see why it
> would. Code is supposed to force undefined, zero and all space to
> numeric zero to stop printf being undefined.
>
> foreach my $value (@array) {
> if( ! $value or $va
On Tue, Aug 21, 2007 at 12:47:22AM +1000, Ken Foskey wrote:
> I have a piece of code that I am assured works and I cannot see why it
> would. Code is supposed to force undefined, zero and all space to
> numeric zero to stop printf being undefined.
>
> foreach my $value (@array) {
> if( ! $va
Nath, Alok (STSD) am Dienstag, 18. Juli 2006 15:30:
> Hi,
> In my current program I am not sure where to
> use rowSpan so that I create table like below.
> In otherwords, I want switch 1 to appear
> once only for the two rows.
>
> My main constraint is I dont want to change the program
> style to c
Nath, Alok (STSD) wrote:
Hi,
In my current program I am not sure where to
use rowSpan so that I create table like below.
In otherwords, I want switch 1 to appear
once only for the two rows.
My main constraint is I dont want to change the program
style to create such a table .
Any help will
http://sourceforge.net/projects/filewatch/
This does what your looking for and much more.
It will tell you what changes inside the file have taken place.
-
InteleNet Communications Inc. "Help me help you."
Chance Ervin - SCSA --Jerry Magu
On Oct 16, Rajat Garg said:
>($1, $2) = split(/=/,$i);
You can't assign to the $ variables. Choose different variable
names.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
what does y//
At 12:45 PM 08/15/2003, Bob Showalter wrote:
Scott Taylor wrote:
> Hello all,
>
> I'm trying to open a file (3 separate files anyway) and iterate
> through them In this portion of my script:
>
> foreach ("dct","lfl","usa"){
>my ($co_id) = $_;
>print "$co_id\n";
>system "rcp orion:/u1/sy
Scott Taylor wrote:
> Hello all,
>
> I'm trying to open a file (3 separate files anyway) and iterate
> through them In this portion of my script:
>
> foreach ("dct","lfl","usa"){
>my ($co_id) = $_;
>print "$co_id\n";
>system "rcp orion:/u1/syncdata/drvdat.$co_id
> /tmp/drv.temp" || ne
The definition of a hash requires that all keys are unique. To use a
hash the way you want, you may need to make the value for the key
"Acorn Drive" a pointer to an array containing the data you intend [A,
B, ...]. You can use an "anonymous" array to hold the data you want.
(This is what the
If I understand correctly what you are trying to do can't be done with "normal"
hashes. Normally a hash can contain only one value for each unique key, and therefore
you overwrite the value each time you assign a value to a particular key. So you have
two obvious options (in other words that I
Oh Ben,
Hash keys MUST be unique!
If you say something like:
Acorn Drive => A
Acorn Drive => B
Acorn Drive will have the value B (the last
one overwrites to previous).
What you may need is a hash of arrays:
Acorn Drive => ['A', 'B',]
Aloha => Beau.
-Original Message-
From: Ben Crane
Ben
Whitespace in filenames is only a problem when it could look like the end of
the filename, such as in a command parameter list. When the filename is
alone in a Perl variable there is no ambiguity and the whitespace is treated
like any other character.
Cheers,
Rob
- Original Message ---
19 matches
Mail list logo