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

Re: [PBML] Creating a Variable Name ???

Expand Messages
  • Jshynes40@aol.com
    Try this and see if this is what you want. ... [Non-text portions of this message have been removed]
    Message 1 of 7 , Jul 31, 2003
    • 0 Attachment
      Try this and see if this is what you want.

      > #!perl -w
      >
      > use strict;
      >
      > my $var1 = "one";
      > my $var2 = "two";
      > my $var3 = "three";
      >
      > my @vara = ($var1, $var2, $var3);
      > my $count = @vara;
      > foreach $count(@vara) {
      > print "$count\n";
      > }



      > sorry, still can't get a result, does these work on your system?
      > and taking the use strict advice has resulted in 'execution aborted
      > due to compilation erros'
      >
      > any ideas?
      >
      > thanks,
      >
      > Alex.
      >
      >
      > #!/usr/bin/perl
      >
      > $var1 = "one";
      > $var2 = "two";
      > $var3 = "three";
      >
      > $total = 3;
      >
      > for ($count=1; $count<=$total;$count++) {
      > $varx = ("\$var$count");
      > print("\n$varx\n");
      > }
      >
      > OR
      >
      >
      > #!/usr/bin/perl
      >
      > #use strict;
      >
      > @x = ("one","two","three");
      > $total = @x;
      >
      > for ($count=1; $count<=$total;$count++) {
      > $varx = $x[$count-1];
      > print("$x");
      > }
      >
      >
      >
      > Unsubscribing info is here:
      > http://help.yahoo.com/help/us/groups/groups-32.html
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
      >



      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.