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

Newbie

Expand Messages
  • J Kennedy
    I have a Perl question but you ll have to excuse me because I m VERY new at it. I m having to configure one of our backup servers from scratch. We have a 128
    Message 1 of 24 , Jun 3 7:34 AM
      I have a Perl question but you'll have to excuse me because I'm VERY new at
      it. I'm having to configure one of our backup servers from scratch. We have
      a 128 port serial adapter and I'm having to create <128ttys and a few LPs.
      The command line string I'm using is:

      mkdev -c tty -t 'tty' -s 'rs232' -p 'sa3' -w '4' -a login='enable' -a
      altpin='enable'

      were the 3 is in 'sa3' and the 4 is will need to cycle through a fixed set
      of numbers (2-9 and 0-15 respectivly). This is the first time I've ever
      dipped my big toe into Perl so any help would be greatly appreciated
    • b_harnish
      ... Try a more descriptive subject. - Brian
      Message 2 of 24 , Jun 3 1:54 PM
        --- In perl-beginner@y..., "J Kennedy" <jkennedy@m...> wrote:
        > I have a Perl question but you'll have to excuse me because I'm VERY new at
        > it. I'm having to configure one of our backup servers from scratch. We have
        > a 128 port serial adapter and I'm having to create <128ttys and a few LPs.
        > The command line string I'm using is:
        >
        > mkdev -c tty -t 'tty' -s 'rs232' -p 'sa3' -w '4' -a login='enable' -a
        > altpin='enable'
        >
        > were the 3 is in 'sa3' and the 4 is will need to cycle through a fixed set
        > of numbers (2-9 and 0-15 respectivly). This is the first time I've ever
        > dipped my big toe into Perl so any help would be greatly appreciated

        Try a more descriptive subject.

        - Brian
      • Cam Coble
        ... It could be shorter,but how about this... ... #!/usr/bin/perl my @first_sequence = `seq 2 9`; chomp @first_sequence; my @second_sequence = `seq 0 15`;
        Message 3 of 24 , Jun 6 7:48 AM
          > The command line string I'm using is:
          >
          > mkdev -c tty -t 'tty' -s 'rs232' -p 'sa3' -w '4' -a login='enable' -a
          > altpin='enable'
          >
          > were the 3 is in 'sa3' and the 4 is will need to cycle through a fixed set
          > of numbers (2-9 and 0-15 respectivly). This is the first time I've ever
          > dipped my big toe into Perl so any help would be greatly appreciated

          It could be shorter,but how about this...
          ---<SNIP>---
          #!/usr/bin/perl

          my @first_sequence = `seq 2 9`;
          chomp @first_sequence;
          my @second_sequence = `seq 0 15`;
          chomp @second_sequence;

          foreach $num1(@first_sequence){
          foreach $num2(@second_sequence){
          my $command = qq#mkdev -c tty -t 'tty' -s 'rs232' -p 'sa$num1' -w '$num2'
          -a login='enable' -a altpin='enable'\n#;
          print $command;
          }
          }
          ---<SNIP>---

          Check the output,... if OK.. change the print statement to a system call.
          I didn't try it but it should probably be like (instead of the print
          $command;)
          ---<SNIP>---
          my $status = system($command);
          print "$command ERROR SIR\n" unless $status ==0;
          ---<SNIP>---

          How does the big toe feel? You should try the whole foot!
          --
          Cam Coble, A+, Network+
          IT Manager
          Roanoke Stamp
          www.usacustom.com

          "any sufficiently advanced technology
          is indistinguishable from magic."
          -- Arthur C. Clark
        • J Kennedy
          ... From: Cam Coble To: perl-beginner@yahoogroups.com Sent: Thursday, June 06, 2002 10:48 AM Subject: Re: [PBML] Newbie It could be shorter,but how about
          Message 4 of 24 , Jun 7 10:23 AM
            ----- Original Message -----
            From: Cam Coble
            To: perl-beginner@yahoogroups.com
            Sent: Thursday, June 06, 2002 10:48 AM
            Subject: Re: [PBML] Newbie



            It could be shorter,but how about this...
            ---<SNIP>---
            #!/usr/bin/perl

            my @first_sequence = `seq 2 9`;
            chomp @first_sequence;
            my @second_sequence = `seq 0 15`;
            chomp @second_sequence;

            foreach $num1(@first_sequence){
            foreach $num2(@second_sequence){
            my $command = qq#mkdev -c tty -t 'tty' -s 'rs232' -p 'sa$num1' -w '$num2'
            -a login='enable' -a altpin='enable'\n#;
            print $command;
            }
            }
            ---<SNIP>---

            Check the output,... if OK.. change the print statement to a system call.
            I didn't try it but it should probably be like (instead of the print
            $command;)

            I did as instructed but I get nothing outputed to the console...when I turn on warnings (#! /usr/local/bin/perl -w) I receive the error:
            zeus:/usr/local/scripts/tty# ./tty.perl.test

            Can't exec "seq": No such file or directory at ./tty.perl.test line 3.
            Can't exec "seq": No such file or directory at ./tty.perl.test line 5.

            any ideas?


            [Non-text portions of this message have been removed]
          • Jeff 'japhy' Pinyan
            ... Why are you calling a program to get a list of numbers?! That reeks of shell. my @first_sequence = (2 .. 9); my @second_sequence = (0 .. 15); -- Jeff
            Message 5 of 24 , Jun 7 10:34 AM
              On Jun 7, J Kennedy said:

              > my @first_sequence = `seq 2 9`;
              > chomp @first_sequence;
              > my @second_sequence = `seq 0 15`;
              > chomp @second_sequence;

              > Can't exec "seq": No such file or directory at ./tty.perl.test line 3.
              > Can't exec "seq": No such file or directory at ./tty.perl.test line 5.

              Why are you calling a program to get a list of numbers?! That reeks of
              shell.

              my @first_sequence = (2 .. 9);
              my @second_sequence = (0 .. 15);

              --
              Jeff "japhy" Pinyan japhy@... http://www.pobox.com/~japhy/
              RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
              ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
              <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. ]
            • Cam Coble
              ... heh... that was stupid wasn t it !? Thanks, -- Cam Coble, A+, Network+ IT Manager Roanoke Stamp www.usacustom.com any sufficiently advanced technology is
              Message 6 of 24 , Jun 7 11:26 AM
                >
                > Why are you calling a program to get a list of numbers?! That reeks of
                > shell.
                >
                > my @first_sequence = (2 .. 9);
                > my @second_sequence = (0 .. 15);
                heh... that was stupid wasn't it !?
                Thanks,
                --
                Cam Coble, A+, Network+
                IT Manager
                Roanoke Stamp
                www.usacustom.com

                "any sufficiently advanced technology
                is indistinguishable from magic."
                -- Arthur C. Clark
              • J Kennedy
                ... #!/usr/bin/perl my @first_sequence = (2 .. 9); chomp @first_sequence; my @second_sequence = (0 .. 15); chomp @second_sequence; foreach
                Message 7 of 24 , Jun 7 12:27 PM
                  ---<SNIP>---
                  #!/usr/bin/perl

                  my @first_sequence = (2 .. 9);
                  chomp @first_sequence;
                  my @second_sequence = (0 .. 15);
                  chomp @second_sequence;

                  foreach $num1(@first_sequence){
                  foreach $num2(@second_sequence){
                  my $command = qq#mkdev -c tty -t 'tty' -s 'rs232' -p 'sa$num1' -w '$num2'
                  -a login='enable' -a altpin='enable'\n#;
                  print $command;
                  }
                  }
                  ---<SNIP>--

                  ok here is were it gets a tad more complicated....(@first_sequence) is a device and (@second_sequence) is a port on the device. This script is intended to create ttys on the ports but we will also be putting printers on some of the ports(which requires a seperate command). Is there any way to say if @first_sequence = x than @second_sequence = n. the reasoning is if @first_sequence = 3 then I want @second_sequence = (0 .. 13) and if @first_sequence = 4 then @second_sequence = (0 .. 14) etc..
                  FMK(for my knowledge)@first_sequence is an array.. the chomp statement removes each item(in the array) as it is used the foreach statement implies that where the $num1 statement is to use the current value of the array defined

                  Thanks for your help guys!!!!I'm finally starting to understand how this works



                  [Non-text portions of this message have been removed]
                • Jeff 'japhy' Pinyan
                  ... Useless use of chomp(). Look it up to see what it does, and you ll see what it s useless here. perldoc -f chomp. ... Well, I m not sure if this is what
                  Message 8 of 24 , Jun 7 2:02 PM
                    On Jun 7, J Kennedy said:

                    >my @first_sequence = (2 .. 9);
                    >chomp @first_sequence;
                    >my @second_sequence = (0 .. 15);
                    >chomp @second_sequence;

                    Useless use of chomp(). Look it up to see what it does, and you'll see
                    what it's useless here. perldoc -f chomp.

                    >foreach $num1(@first_sequence){
                    > foreach $num2(@second_sequence){
                    > my $command = qq#mkdev -c tty -t 'tty' -s 'rs232' -p 'sa$num1' -w '$num2'
                    >-a login='enable' -a altpin='enable'\n#;
                    > print $command;
                    > }
                    >}

                    >ok here is were it gets a tad more complicated....(@first_sequence) is a
                    >device and (@second_sequence) is a port on the device. This script is
                    >intended to create ttys on the ports but we will also be putting
                    >printers on some of the ports(which requires a seperate command). Is
                    >there any way to say if @first_sequence = x than @second_sequence = n.
                    >the reasoning is if @first_sequence = 3 then I want @second_sequence =
                    >(0 .. 13) and if @first_sequence = 4 then @second_sequence = (0 .. 14)

                    Well, I'm not sure if this is what you mean, but...

                    for $num1 (2 .. 9) {
                    for $num2 (0 .. 10 + $num1) {
                    # do something
                    }
                    }

                    --
                    Jeff "japhy" Pinyan japhy@... http://www.pobox.com/~japhy/
                    RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
                    ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
                    <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. ]
                  • J Kennedy
                    ... From: Jeff japhy Pinyan To: perl-beginner@yahoogroups.com Sent: Friday, June 07, 2002 5:02 PM Subject: Re: [PBML] Newbie ... Well, I m not sure if this
                    Message 9 of 24 , Jun 10 6:04 AM
                      ----- Original Message -----
                      From: Jeff 'japhy' Pinyan
                      To: perl-beginner@yahoogroups.com
                      Sent: Friday, June 07, 2002 5:02 PM
                      Subject: Re: [PBML] Newbie

                      >ok here is were it gets a tad more complicated....(@first_sequence) is a
                      >device and (@second_sequence) is a port on the device. This script is
                      >intended to create ttys on the ports but we will also be putting
                      >printers on some of the ports(which requires a seperate command). Is
                      >there any way to say if @first_sequence = x than @second_sequence = n.
                      >the reasoning is if @first_sequence = 3 then I want @second_sequence =
                      >(0 .. 13) and if @first_sequence = 4 then @second_sequence = (0 .. 14)

                      Well, I'm not sure if this is what you mean, but...

                      for $num1 (2 .. 9) {
                      for $num2 (0 .. 10 + $num1) {
                      # do something
                      }
                      }
                      ###############################################################################

                      I'm not 100% sure but I don't think this is what I need..What I need .... $num1 = (0 .. 3) if $num1 = 0 then $num2 = (0 .. 15), if $num1 = 1 then $num2 = (0 .. 13), if $num1 = 2 then $num2 = (0 .. 11), etc...

                      [Non-text portions of this message have been removed]
                    • Cam Coble
                      ... The chomp is left over from the need to get rid of the n s from the original shell command `seq 2,9`; Someone didn t like that so: my @first_sequence
                      Message 10 of 24 , Jun 10 6:46 AM
                        On Friday 07 June 2002 05:02 pm, Jeff 'japhy' Pinyan wrote:
                        > On Jun 7, J Kennedy said:
                        > >my @first_sequence = (2 .. 9);
                        > >chomp @first_sequence;
                        > >my @second_sequence = (0 .. 15);
                        > >chomp @second_sequence;
                        >
                        > Useless use of chomp(). Look it up to see what it does, and you'll see
                        > what it's useless here. perldoc -f chomp.

                        The chomp is left over from the need to get rid of the \n's from the original
                        shell command `seq 2,9`;
                        Someone didn't like that so:
                        my @first_sequence (2..9) ; works quite well as is ....

                        This code will work for what you need .
                        -----<snip>-----
                        #!/usr/bin/perl

                        foreach $num1(2..9){
                        foreach $num2(0..15){
                        my $command = qq#mkdev -c tty -t 'tty' -s 'rs232' -p 'sa$num1' -w '$num2'
                        -a login='enable' -a altpin='enable'\n#;
                        my $status = system($command);
                        print "$command ERROR SIR\n" unless $status ==0;
                        }
                        }
                        -----<snip>-----

                        perl rocks.... any way you want to code it....
                        --
                        Cam Coble, A+, Network+
                        IT Manager
                        Roanoke Stamp
                        www.usacustom.com

                        "any sufficiently advanced technology
                        is indistinguishable from magic."
                        -- Arthur C. Clark
                      • Jeff 'japhy' Pinyan
                        ... How do you make the connection between $num1 and the upper range of $num2? Is there some system? Or is it just a given correspondance? @upper_bound = (15,
                        Message 11 of 24 , Jun 10 7:16 AM
                          On Jun 10, J Kennedy said:

                          >> for $num1 (2 .. 9) {
                          >> for $num2 (0 .. 10 + $num1) {
                          >> # do something
                          >> }
                          >> }
                          >
                          > I'm not 100% sure but I don't think this is what I need..What I need
                          >.... $num1 = (0 .. 3) if $num1 = 0 then $num2 = (0 .. 15), if $num1 = 1
                          >then $num2 = (0 .. 13), if $num1 = 2 then $num2 = (0 .. 11), etc...

                          How do you make the connection between $num1 and the upper range of $num2?
                          Is there some system? Or is it just a given correspondance?

                          @upper_bound = (15, 13, 11, 9);
                          for $num1 (0 .. 3) {
                          for $num2 (0 .. $upper_bound[$num1]) {
                          # ...
                          }
                          }

                          However, if the series IS (15,13,11,9,7,5,3,1), then there's a
                          mathematical solution:

                          for $num1 (0 .. 3) {
                          for $num2 (0 .. (15 - 2 * $num1)) {
                          # ...
                          }
                          }

                          --
                          Jeff "japhy" Pinyan japhy@... http://www.pobox.com/~japhy/
                          RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
                          ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
                          <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. ]
                        • J Kennedy
                          I hope I m answering this properly but...$num1 is a single device with 16 ports and each port on the device is referenced by $num2 there are a total of 8
                          Message 12 of 24 , Jun 10 7:53 AM
                            I hope I'm answering this properly but...$num1 is a single device with 16 ports and each port on the device is referenced by $num2 there are a total of 8 devices($num1). On each port($num2) we have either a tty or a lp created. The command orginally proposed(mkdev -c tty -t 'tty' -s 'rs232' -p 'sa$num1' -w '$num2' -a login='enable' -a altpin='enable') creates a tty I also need to create lps on some of the ports using a alltogether different command( I had planned on doing it with a seperate script). the amount of ttys created varies from device to device(some use all 16 ports some use as little as 9 ports).Just in case you are curious these are serial concentrators the offer up to 128 ports of serial connectivity. I was thinking maybie there was a way to set up an array with defined ranges sunh as:
                            my @first_sequence = (0 ..15), (0 .. 10), (0 .. 9), etc.....
                            with a shift operator that would remove each defined sequence (from the left) as it was used. I know my syntax is all wrong but I'm really new at this.

                            Thanks again
                            Joseph


                            ----- Original Message -----
                            From: Jeff 'japhy' Pinyan
                            To: perl-beginner@yahoogroups.com
                            Sent: Monday, June 10, 2002 10:16 AM
                            Subject: Re: [PBML] Newbie


                            On Jun 10, J Kennedy said:

                            >> for $num1 (2 .. 9) {
                            >> for $num2 (0 .. 10 + $num1) {
                            >> # do something
                            >> }
                            >> }
                            >
                            > I'm not 100% sure but I don't think this is what I need..What I need
                            >.... $num1 = (0 .. 3) if $num1 = 0 then $num2 = (0 .. 15), if $num1 = 1
                            >then $num2 = (0 .. 13), if $num1 = 2 then $num2 = (0 .. 11), etc...

                            How do you make the connection between $num1 and the upper range of $num2?
                            Is there some system? Or is it just a given correspondance?

                            @upper_bound = (15, 13, 11, 9);
                            for $num1 (0 .. 3) {
                            for $num2 (0 .. $upper_bound[$num1]) {
                            # ...
                            }
                            }

                            However, if the series IS (15,13,11,9,7,5,3,1), then there's a
                            mathematical solution:

                            for $num1 (0 .. 3) {
                            for $num2 (0 .. (15 - 2 * $num1)) {
                            # ...
                            }
                            }

                            --
                            Jeff "japhy" Pinyan japhy@... http://www.pobox.com/~japhy/
                            RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
                            ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
                            <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. ]


                            Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html

                            Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


                            [Non-text portions of this message have been removed]
                          • Jeff 'japhy' Pinyan
                            ... Just create an array that holds the upper limits for each value of $num1. -- Jeff japhy Pinyan japhy@pobox.com http://www.pobox.com/~japhy/ RPI
                            Message 13 of 24 , Jun 10 8:06 AM
                              On Jun 10, J Kennedy said:

                              >I hope I'm answering this properly but...$num1 is a single device with
                              >16 ports and each port on the device is referenced by $num2 there are a
                              >total of 8 devices($num1). On each port($num2) we have either a tty or a
                              >lp created. The command orginally proposed(mkdev -c tty -t 'tty' -s
                              >'rs232' -p 'sa$num1' -w '$num2' -a login='enable' -a altpin='enable')
                              >creates a tty I also need to create lps on some of the ports using a
                              >alltogether different command( I had planned on doing it with a seperate
                              >script). the amount of ttys created varies from device to device(some
                              >use all 16 ports some use as little as 9 ports).Just in case you are
                              >curious these are serial concentrators the offer up to 128 ports of
                              >serial connectivity. I was thinking maybie there was a way to set up an
                              >array with defined ranges sunh as: my @first_sequence = (0 ..15), (0 ..
                              >10), (0 .. 9), etc..... with a shift operator that would remove each
                              >defined sequence (from the left) as it was used. I know my syntax is all
                              >wrong but I'm really new at this.

                              If that's what you want, then use this code:

                              > @upper_bound = (15, 13, 11, 9);
                              > for $num1 (0 .. 3) {
                              > for $num2 (0 .. $upper_bound[$num1]) {
                              > # ...
                              > }
                              > }

                              Just create an array that holds the upper limits for each value of $num1.

                              --
                              Jeff "japhy" Pinyan japhy@... http://www.pobox.com/~japhy/
                              RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
                              ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
                              <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. ]
                            • J Kennedy
                              ... From: Jeff japhy Pinyan To: perl-beginner@yahoogroups.com Sent: Monday, June 10, 2002 11:06 AM Subject: Re: [PBML] Newbie ... Just create an array that
                              Message 14 of 24 , Jun 10 8:21 AM
                                ----- Original Message -----
                                From: Jeff 'japhy' Pinyan
                                To: perl-beginner@yahoogroups.com
                                Sent: Monday, June 10, 2002 11:06 AM
                                Subject: Re: [PBML] Newbie


                                On Jun 10, J Kennedy said:

                                >I hope I'm answering this properly but...$num1 is a single device with
                                >16 ports and each port on the device is referenced by $num2 there are a
                                >total of 8 devices($num1). On each port($num2) we have either a tty or a
                                >lp created. The command orginally proposed(mkdev -c tty -t 'tty' -s
                                >'rs232' -p 'sa$num1' -w '$num2' -a login='enable' -a altpin='enable')
                                >creates a tty I also need to create lps on some of the ports using a
                                >alltogether different command( I had planned on doing it with a seperate
                                >script). the amount of ttys created varies from device to device(some
                                >use all 16 ports some use as little as 9 ports).Just in case you are
                                >curious these are serial concentrators the offer up to 128 ports of
                                >serial connectivity. I was thinking maybie there was a way to set up an
                                >array with defined ranges sunh as: my @first_sequence = (0 ..15), (0 ..
                                >10), (0 .. 9), etc..... with a shift operator that would remove each
                                >defined sequence (from the left) as it was used. I know my syntax is all
                                >wrong but I'm really new at this.

                                If that's what you want, then use this code:

                                > @upper_bound = (15, 13, 11, 9);
                                > for $num1 (0 .. 3) {
                                > for $num2 (0 .. $upper_bound[$num1]) {
                                > # ...
                                > }
                                > }

                                Just create an array that holds the upper limits for each value of $num1.

                                so if my sequences are (0 .. 15), (0 .. 9), (0 .. 10) (0 .. 8), etc... @upper_bound would equal (15, 9, 10, 8)?
                                So ,just curious, 15 would equal @upper_bound[0], 9 would equal @upper_bound[1], 10 would equal @upper_bound[2], and 8 would equal @upper_bound[3]? Would the number sequence be messed up if $num1 (2 .. 9)or does it assign order by numeric order of apperence (aka 2 = 0, 3 = 1, 4 =2, etc...)?


                                [Non-text portions of this message have been removed]
                              • Jeff 'japhy' Pinyan
                                ... Yes. ... Yes. ... Yes, it would be messed up. If you re concerned, use shift(). @upper_bound = (15, 9, 10, 8); for $num1 (2 .. 5) { for $num2 (0 .. shift
                                Message 15 of 24 , Jun 10 8:24 AM
                                  On Jun 10, J Kennedy said:

                                  > so if my sequences are (0 .. 15), (0 .. 9), (0 .. 10) (0 .. 8), etc...
                                  >@upper_bound would equal (15, 9, 10, 8)?

                                  Yes.

                                  > So ,just curious, 15 would equal @upper_bound[0], 9 would equal
                                  >@upper_bound[1], 10 would equal @upper_bound[2], and 8 would equal
                                  >@upper_bound[3]?

                                  Yes.

                                  >Would the number sequence be messed up if $num1 (2 ..
                                  >9)or does it assign order by numeric order of apperence (aka 2 = 0, 3 =
                                  >1, 4 =2, etc...)?

                                  Yes, it would be messed up. If you're concerned, use shift().

                                  @upper_bound = (15, 9, 10, 8);
                                  for $num1 (2 .. 5) {
                                  for $num2 (0 .. shift @upper_bound) {
                                  # ...
                                  }
                                  }

                                  How about you try some of this code? It's not going to kill you.

                                  --
                                  Jeff "japhy" Pinyan japhy@... http://www.pobox.com/~japhy/
                                  RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
                                  ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
                                  <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. ]
                                • J Kennedy
                                  ... From: Jeff japhy Pinyan To: perl-beginner@yahoogroups.com Sent: Monday, June 10, 2002 11:24 AM Subject: Re: [PBML] Newbie ... Yes. ... Yes. ... Yes, it
                                  Message 16 of 24 , Jun 10 8:40 AM
                                    ----- Original Message -----
                                    From: Jeff 'japhy' Pinyan
                                    To: perl-beginner@yahoogroups.com
                                    Sent: Monday, June 10, 2002 11:24 AM
                                    Subject: Re: [PBML] Newbie


                                    On Jun 10, J Kennedy said:

                                    > so if my sequences are (0 .. 15), (0 .. 9), (0 .. 10) (0 .. 8), etc...
                                    >@upper_bound would equal (15, 9, 10, 8)?

                                    Yes.

                                    > So ,just curious, 15 would equal @upper_bound[0], 9 would equal
                                    >@upper_bound[1], 10 would equal @upper_bound[2], and 8 would equal
                                    >@upper_bound[3]?

                                    Yes.

                                    >Would the number sequence be messed up if $num1 (2 ..
                                    >9)or does it assign order by numeric order of apperence (aka 2 = 0, 3 =
                                    >1, 4 =2, etc...)?

                                    Yes, it would be messed up. If you're concerned, use shift().

                                    @upper_bound = (15, 9, 10, 8);
                                    for $num1 (2 .. 5) {
                                    for $num2 (0 .. shift @upper_bound) {
                                    # ...
                                    }
                                    }

                                    How about you try some of this code? It's not going to kill you.
                                    #################################################################

                                    I'm going to piece something together now...I've had to send most of my morning behind the rack consolidating for our upcoming move and have been hit-and-run on my computer but now I will get some time to work on it. Thank you for all your help!!!!!


                                    [Non-text portions of this message have been removed]
                                  • J Kennedy
                                    How about you try some of this code? It s not going to kill you. Just got a chance to try it and it seems to work fine...thanks again!!!! [Non-text portions
                                    Message 17 of 24 , Jun 10 10:48 AM
                                      How about you try some of this code? It's not going to kill you.


                                      Just got a chance to try it and it seems to work fine...thanks again!!!!

                                      [Non-text portions of this message have been removed]
                                    • Jason Ya hoo
                                      ... __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com
                                      Message 18 of 24 , Jun 10 3:36 PM
                                        --- J Kennedy <jkennedy@...> wrote:
                                        >
                                        >
                                        > How about you try some of this code? It's not
                                        > going to kill you.
                                        >
                                        >
                                        > Just got a chance to try it and it seems to work
                                        > fine...thanks again!!!!
                                        >
                                        > [Non-text portions of this message have been
                                        > removed]
                                        >
                                        >


                                        __________________________________________________
                                        Do You Yahoo!?
                                        Yahoo! - Official partner of 2002 FIFA World Cup
                                        http://fifaworldcup.yahoo.com
                                      • love_four_paws
                                        Hi, my name is shelly and I m a newbie. I know a lot of HTML, a little PHP but am still foggy on Perl and MySQL. I m searching for a group that can help me
                                        Message 19 of 24 , Oct 26, 2005
                                          Hi, my name is shelly and I'm a newbie. I know a lot of HTML, a little
                                          PHP but am still foggy on Perl and MySQL. I'm searching for a group
                                          that can help me with those areas. I want to make a classifieds
                                          website where people can join a membership, pay for and then place an
                                          ad all in real time without my having to be there the whole time to
                                          hold their hand; if you know what I mean.

                                          If anyone can help, let me know. I'll return later today.

                                          Shelly
                                        • merlyn@stonehenge.com
                                          ... love Hi, my name is shelly and I m a newbie. I know a lot of HTML, a little love PHP but am still foggy on Perl and MySQL. I m searching for a group
                                          Message 20 of 24 , Oct 26, 2005
                                            >>>>> "love" == love four paws <love_four_paws@...> writes:

                                            love> Hi, my name is shelly and I'm a newbie. I know a lot of HTML, a little
                                            love> PHP but am still foggy on Perl and MySQL. I'm searching for a group
                                            love> that can help me with those areas. I want to make a classifieds
                                            love> website where people can join a membership, pay for and then place an
                                            love> ad all in real time without my having to be there the whole time to
                                            love> hold their hand; if you know what I mean.

                                            Start with the resources at http://learn.perl.org/.

                                            love> If anyone can help, let me know. I'll return later today.

                                            "today" is meaningless on the net. People of all timezones are
                                            reading this list.

                                            --
                                            Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
                                            <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
                                            Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
                                            See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
                                          • love_four_paws
                                            ... HTML, a little ... a group ... classifieds ... place an ... time to ... 777 0095 ... Perl training! ... Okay, so I don t have time or money to go rootin
                                            Message 21 of 24 , Oct 26, 2005
                                              --- In perl-beginner@yahoogroups.com, merlyn@s... wrote:
                                              >
                                              > >>>>> "love" == love four paws <love_four_paws@y...> writes:
                                              >
                                              > love> Hi, my name is shelly and I'm a newbie. I know a lot of
                                              HTML, a little
                                              > love> PHP but am still foggy on Perl and MySQL. I'm searching for
                                              a group
                                              > love> that can help me with those areas. I want to make a
                                              classifieds
                                              > love> website where people can join a membership, pay for and then
                                              place an
                                              > love> ad all in real time without my having to be there the whole
                                              time to
                                              > love> hold their hand; if you know what I mean.
                                              >
                                              > Start with the resources at http://learn.perl.org/.
                                              >
                                              > love> If anyone can help, let me know. I'll return later today.
                                              >
                                              > "today" is meaningless on the net. People of all timezones are
                                              > reading this list.
                                              >
                                              > --
                                              > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503
                                              777 0095
                                              > <merlyn@s...> <URL:http://www.stonehenge.com/merlyn/>
                                              > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
                                              > See PerlTraining.Stonehenge.com for onsite and open-enrollment
                                              Perl training!
                                              >

                                              Okay, so I don't have time or money to go rootin' around the net
                                              buying books that may or may not help me. I bought a Java book once--
                                              the cover and description claimed that lessons were in plain english
                                              and it was easy. Yea, it was all as clear as mud. There are SOOO
                                              many HTML tutorials on the net (FREE) so why are there no PERL
                                              tutorials on the net FREE? I thought that was what this group was
                                              about. I came to the group for assistance, not to be pointed
                                              elsewhere- a dead end I might add.

                                              If ANYONE can help, I'm using Yahoo Small business. So everything is
                                              active, but the easiest route to do what I want is to buy FrontPage
                                              and I don't have $200 to spend on that. So I'm looking for any
                                              tutorials from anyone (FREE) who can help.
                                            • merlyn@stonehenge.com
                                              ... love Okay, so I don t have time or money to go rootin around the net love buying books that may or may not help me. I bought a Java book love once--
                                              Message 22 of 24 , Oct 26, 2005
                                                >>>>> "love" == love four paws <love_four_paws@...> writes:

                                                love> Okay, so I don't have time or money to go rootin' around the net
                                                love> buying books that may or may not help me. I bought a Java book
                                                love> once-- the cover and description claimed that lessons were in
                                                love> plain english and it was easy. Yea, it was all as clear as
                                                love> mud. There are SOOO many HTML tutorials on the net (FREE) so why
                                                love> are there no PERL tutorials on the net FREE? I thought that was
                                                love> what this group was about. I came to the group for assistance,
                                                love> not to be pointed elsewhere- a dead end I might add.

                                                Did you even *look* at learn.perl.org? Plenty of "free book pointers",
                                                "free tutorials", and Perl itself comes with a lot of tutorial material.

                                                (Aside: Geez. Try to help, and they piss on you. No wonder we get uppity.)

                                                Also, it's never "PERL". It's "Perl" (the language) or "perl" (the binary
                                                that runs your scripts). Never "PERL".

                                                --
                                                Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
                                                <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
                                                Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
                                                See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
                                              • merlyn@stonehenge.com
                                                ... merlyn Did you even *look* at learn.perl.org? Plenty of free book merlyn pointers , free tutorials , and Perl itself comes with a lot merlyn of
                                                Message 23 of 24 , Oct 26, 2005
                                                  >>>>> "merlyn" == merlyn <merlyn@...> writes:

                                                  merlyn> Did you even *look* at learn.perl.org? Plenty of "free book
                                                  merlyn> pointers", "free tutorials", and Perl itself comes with a lot
                                                  merlyn> of tutorial material.

                                                  And thinking that through again, if you either:
                                                  (a) neither looked, nor
                                                  (b) looked, but missed the link:

                                                  Announcing the learn.perl.org Online Library where you can read
                                                  your favorite perl books.

                                                  then you aren't worth helping, because educating you would be like teaching
                                                  a pig to sing.

                                                  --
                                                  Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
                                                  <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
                                                  Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
                                                  See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
                                                • Mike Southern
                                                  Actually you can teach pigs to sing, they ll just never get to Covent Garden except as a meal.
                                                  Message 24 of 24 , Oct 26, 2005
                                                    Actually you can teach pigs to sing, they'll just never get to Covent Garden
                                                    except as a meal.


                                                    On 10/26/05 3:18 PM, merlyn@... at merlyn@... wrote:

                                                    > then you aren't worth helping, because educating you would be like teaching
                                                    > a pig to sing.
                                                  Your message has been successfully submitted and would be delivered to recipients shortly.