Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] "Alias" for a Variable?

Expand Messages
  • Rick
    ... Because Perl is new to me, and i didn t know better. ... Of course...thanks. ... Because Perl is new to me, and i didn t know better. ... Ok, I put the -w
    Message 1 of 3 , Nov 5, 2002
    • 0 Attachment
      > >$swapx = (($x[1],$x[2]) = ($x[2],$x[1]));
      >
      > Why are you storing the value?

      Because Perl is new to me, and i didn't know better.


      > And your swap is better written as
      >
      > @x[1,2] = @x[2,1];

      Of course...thanks.

      >
      > >print ("X[0]: @x[0] \n\n") ;
      >
      > Why are you using @x[0] here, instead of $x[1]?

      Because Perl is new to me, and i didn't know better.


      > Your code should have
      > warnings on (via the -w switch).

      Ok, I put the -w switch on and the warnings did indeed surface.
      Strange how it works, but It shouldn't have. I heard that Perl makes
      a lot of assumptions....sometimes its for the good, but could back-
      fire.

      thanks for your help :)

      rs

      >
      > --
      > Jeff "japhy" Pinyan japhy@p...
      http://www.pobox.com/~japhy/
      > RPI Acacia brother #734 http://www.perlmonks.org/
      http://www.cpan.org/
      > <stu> what does y/// stand for? <tenderpuss> why, yansliterate of
      course.
      > [ I'm looking for programming work. If you like my work, let me
      know. ]
    Your message has been successfully submitted and would be delivered to recipients shortly.