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

Re: [PBML] Digest Number 1010

Expand Messages
  • Valerie Fortin
    Hi there, I am just starting out with VB and I am no too sure how to do this but I am doing a program with MDI forms. The program is soppsed to output the
    Message 1 of 3 , Nov 1, 2002
    • 0 Attachment
      Hi there,
      I am just starting out with VB and I am no too sure how to do this but I am doing a program with MDI forms. The program is soppsed to output the number of good items in a production line and number of bad items in the production line.It supposed to record these numbers. I am to have (2) forms: the second form is to diplay the output and MDI form. I would apreciate all the help i can get
      bandit_spirit

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

      There are 16 messages in this issue.

      Topics in this digest:

      1. Process binary files
      From: "matt_johnsson"
      2. Re: Reg Exp and pattern matching
      From: Hans Ginzel
      3. Re: Perl and PHP
      From: "Octavian Rasnita"
      4. RE: ? - Getting email addresses..
      From: Mark Sutfin
      5. Server headers and footers
      From: "Admin"
      6. Search Vars $` $& and $'
      From: Joe Catanzaro
      7. Is his Perl code?
      From: "don94579"

      8. RE: Reg Exp and pattern matching
      From: Nathan.Jeffrey@...
      9. RE: Search Vars $` $& and $'
      From: "Franki"
      10. RE: Is his Perl code?
      From: "Franki"
      11. Re: Is his Perl code?
      From: Nathan.Jeffrey@...
      12. RE: Is his Perl code?
      From: "prakash"

      13. Regex - pattern matching
      From: "dmaltez2002"
      14. RE: Process binary files
      From: "Charles K. Clarkson"
      15. RE: Process binary files
      From: Nathan.Jeffrey@...
      16. Re: Process binary files
      From: Hans Ginzel


      ________________________________________________________________________
      ________________________________________________________________________

      Message: 1
      Date: Thu, 31 Oct 2002 14:43:46 -0000
      From: "matt_johnsson"
      Subject: Process binary files

      Hello all,

      I have a perl script that processes a binary file with
      variable lenght records in it. I'm trying to split it
      into several binary files, one per record found (using a part of
      the data to build the filename).
      Each record starts with the string "HEADER".
      My script does that but it does it in a very slow and ugly way, I'm
      sure you will all agree...
      Could I please have some ideas on how to do it better and faster!

      Regards
      /Matt

      The bulk of the processing is.... :

      open (IN,"< $filename") or die "can not open $filename to read";
      binmode{IN};
      # Read the entire file byte by byte into a array called items
      while (read IN,$buffer,1) {
      push (@items, $buffer);
      }
      my $index=0;
      while ($index < $#items+1){
      if ($items[$index] eq 'H') {
      if ( $items[$index+1] eq 'E' &&
      $items[$index+2] eq 'A' &&
      $items[$index+3] eq 'D' &&
      $items[$index+4] eq 'E' &&
      $items[$index+5] eq 'R' ) {
      my
      $SERIAL="$items[$index+28]$items[$index+29]$items[$index+30]$items[$index+31]$items[$index+32]".

      "$items[$index+33]$items[$index+34]$items[$index+35]$items[$index+36]$items[$index+37]".

      "$items[$index+38]$items[$index+39]$items[$index+40]$items[$index+41]$items[$index+42]".

      "$items[$index+43]$items[$index+44]$items[$index+45]$items[$index+46]$items[$index+47]";
      # Strip out traling blanks from the SERIAL so
      the new filename does not end in blanks
      $SERIAL =~ s/ *$//;
      print "$SERIAL\n";
      # Build the new filename
      $outfile=$outfilebase.".".$SERIAL;
      # If the file already exists do not create a new one
      if ( ! -e $outfile ) {
      #no such file found, creating a new one
      close (OUT);
      open (OUT,"> $outfile") or die "can
      not open file $outfile to write\n";
      binmode(OUT);
      $fileisopen = 'Y';
      }
      }
      }
      if ($fileisopen eq 'Y') {
      print OUT $items[$index];
      }
      $index++;
      }



      ________________________________________________________________________
      ________________________________________________________________________

      Message: 2
      Date: Thu, 31 Oct 2002 16:56:42 +0100
      From: Hans Ginzel
      Subject: Re: Reg Exp and pattern matching


      On Thu, Oct 31, 2002 at 08:47:10AM -0500, John Drabinowicz wrote:
      >
      > in Ravi's if ($line =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)
      > what do the ^ and the $ at the end signify?

      perldoc perlre

      ^ Match the beginning of the line
      $ Match the end of the line (or before newline at the end)

      > Thanks for all the help, I ended up using this:
      > if ($line =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/)

      More precise is (as previouse posts)
      $ip_part = qr/[01]?\d\d|2[0-4]\d|25[0-5]/;
      $line =~ /($ip_part(?:\.$ip_part){3})/o;
      $ip = $1;

      Hans


      ________________________________________________________________________
      ________________________________________________________________________

      Message: 3
      Date: Thu, 31 Oct 2002 07:48:46 +0200
      From: "Octavian Rasnita"
      Subject: Re: Perl and PHP

      Or use:

      #!/usr/bin/perl

      my $php = "path to the php file";
      print "Location: $php\n\n";

      Teddy's Center: http://teddy.fcc.ro/
      Email: orasnita@...

      ----- Original Message -----
      From: "Charles K. Clarkson"
      To:

      Sent: Thursday, October 31, 2002 2:02 AM
      Subject: RE: [PBML] Perl and PHP


      Folk Art Kits [mailto:webmaster@...] wrote:

      : Is it possible to execute a PHP script within a Perl shopping cart?
      : It is printing the code but will not execute it? Any help please????

      Redirect it:

      use CGI;
      my $q = CGI->new();

      my $php_script = '/path/to/script.php';

      print $q->redirect( $php_script );


      HTH,

      Charles K. Clarkson
      --
      Head Bottle Washer,
      Clarkson Energy Homes, Inc.
      254 968-8328





      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/






      ________________________________________________________________________
      ________________________________________________________________________

      Message: 4
      Date: Thu, 31 Oct 2002 09:54:35 -0700
      From: Mark Sutfin
      Subject: RE: ? - Getting email addresses..

      On Tuesday, October 29, 2002 11:03 AM M. Sutfin wrote

      >Programmatically, I need to get the email address for each employee. I made
      >reuse of some good samaritan's code (Paula?), posted awhile back, which is
      >below. It provides, what appears to be the "Display Name" from Outlook
      >global address book. I thought I could append the domain
      >(@...) to the display name and build an email address.




      Here's the approach I took. Alot simpler than learning VB.. I scheduled this
      line command in a batch job ...then parsed the output (export.csv)

      admin /e
      \export.csv /o
      \export.ini

      See this link for explanation

      http://support.microsoft.com/default.aspx?scid=kb;en-us;Q149447

      Mark


      ________________________________________________________________________
      ________________________________________________________________________

      Message: 5
      Date: Thu, 31 Oct 2002 15:59:39 -0800
      From: "Admin"
      Subject: Server headers and footers

      How do I add a header and footer to web pages with out adding anything to
      the web pages them self.





      ________________________________________________________________________
      ________________________________________________________________________

      Message: 6
      Date: Thu, 31 Oct 2002 15:19:00 -0600
      From: Joe Catanzaro
      Subject: Search Vars $` $& and $'

      I've read several times that $` $& and $' are inefficient and that they
      should be avoided. I've also read (if I remember correctly) that they are
      no longer inefficient. Is this true? Should I continue to avoid the use of
      these. Also, if these are no longer inefficient, what version was this
      change made?




      Joe Catanzaro
      joecatanzaro@...



      ________________________________________________________________________
      ________________________________________________________________________

      Message: 7
      Date: Thu, 31 Oct 2002 21:29:29 -0000
      From: "don94579"

      Subject: Is his Perl code?

      Does anyone know if this is Perl code?
      To what language does FetchRow() belong?


      if( $server1->Sql( "select * from table22 where name = '$name' "))

      while ($webhistb->FetchRow())

      Thanks,
      Don




      ________________________________________________________________________
      ________________________________________________________________________

      Message: 8
      Date: Fri, 1 Nov 2002 08:30:08 +1100
      From: Nathan.Jeffrey@...
      Subject: RE: Reg Exp and pattern matching

      They match the beginning and end of the string, respectively.

      N





      John Drabinowicz
      01/11/2002 12:47 AM
      Please respond to perl-beginner


      To: "'perl-beginner@yahoogroups.com'"

      cc:
      Subject: RE: [PBML] Reg Exp and pattern matching


      Hi Ravi and all,

      in Ravi's if ($line =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)
      what do the ^ and the $ at the end signify?

      Thanks for all the help, I ended up using this:
      if ($line =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/)

      it works great, that was the last peice I needed to fic my little code
      snippit below:
      -cut---------------------------------------------------
      $host =~ tr/A-Z/a-z/; # make all lower case
      if ($host eq "localhost"){
      # convert to unqualified host name (in lower case)

      }
      elsif ($host =~ m/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/){
      # convert to unqualified host name (in lower case)

      }
      -cut---------------------------------------------------


      -----Original Message-----
      From: Ravi Kiran [mailto:RKiran@...]
      Sent: Wednesday, October 30, 2002 7:17 PM
      To: 'perl-beginner@yahoogroups.com'
      Subject: RE: [PBML] Reg Exp and pattern matching


      U can also use
      if ($line =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) if ($line =~
      /^(\d{1,3}\.){3}\d{1,3}$/)
      -RK

      -----Original Message-----
      From: John Drabinowicz [mailto:jdrab@...]
      Sent: Wednesday, October 30, 2002 8:44 AM
      To: perl-beginner@yahoogroups.com
      Subject: [PBML] Reg Exp and pattern matching


      Hi Gang,

      I'm still not very deep into regular expressions, but I need to see if a
      variable is a name of an IP address.
      The problem that I'm having is that the numbers between the dots can be
      from
      1-3 digits, can anyone
      out there help me? what I've got so far is:

      use strict;
      use Sys::Hostname;
      use Socket;
      my $abc = "1.2.3.4";
      if ($abc =~ m/[0-9]\.[0-9]\.[0-9]\.[0-9]/)
      {
      print "found it\n";
      }
      else
      {
      print "didn't find it\n";
      }

      Thanks,

      John D.


      [Non-text portions of this message have been removed]



      Yahoo! Groups Sponsor

      ADVERTISEMENT

      51:HM/A=1267611/R=0/*http://ad.doubleclick.net/jump/N2524.Yahoo/B1071650;sz=
      300x250;ord=1035996335939911?>

      l/S=:HM/A=1267611/rand=262611687>

      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]



      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]



      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/







      _________________________________________________________________________________

      This email contains confidential information intended only for the person named above and may be subject to legal privilege. If you are not the intended recipient, any disclosure, copying or use of this information is prohibited. The Department provides no guarantee that this communication is free of virus or that it has not been intercepted or interfered with. If you have received this email in error or have any other concerns regarding its transmission, please notify Postmaster@...
      _________________________________________________________________________________



      ________________________________________________________________________
      ________________________________________________________________________

      Message: 9
      Date: Fri, 1 Nov 2002 05:32:25 +0800
      From: "Franki"
      Subject: RE: Search Vars $` $& and $'

      according to "programing with perl ver 3" they are less inefficient then
      they were.. and if you use them once.. you might as well use them all over
      the place, since you have already incurred the penalty....

      So they still slow things down, but not as much as they used to.


      rgds

      Frank




      -----Original Message-----
      From: Joe Catanzaro [mailto:joecatanzaro@...]
      Sent: Friday, 1 November 2002 5:19 AM
      To: perl-beginner@yahoogroups.com
      Subject: [PBML] Search Vars $` $& and $'


      I've read several times that $` $& and $' are inefficient and that they
      should be avoided. I've also read (if I remember correctly) that they are
      no longer inefficient. Is this true? Should I continue to avoid the use of
      these. Also, if these are no longer inefficient, what version was this
      change made?




      Joe Catanzaro
      joecatanzaro@...



      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/





      ________________________________________________________________________
      ________________________________________________________________________

      Message: 10
      Date: Fri, 1 Nov 2002 05:36:21 +0800
      From: "Franki"
      Subject: RE: Is his Perl code?

      yes, that looks like perl..

      and FetchRow() is perl as well...

      it looks like its code using the DBI module..


      rgds

      Frank

      -----Original Message-----
      From: don94579 [mailto:ddachner@...]
      Sent: Friday, 1 November 2002 5:29 AM
      To: perl-beginner@yahoogroups.com
      Subject: [PBML] Is his Perl code?


      Does anyone know if this is Perl code?
      To what language does FetchRow() belong?


      if( $server1->Sql( "select * from table22 where name = '$name' "))

      while ($webhistb->FetchRow())

      Thanks,
      Don




      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/





      ________________________________________________________________________
      ________________________________________________________________________

      Message: 11
      Date: Fri, 1 Nov 2002 08:36:31 +1100
      From: Nathan.Jeffrey@...
      Subject: Re: Is his Perl code?

      It looks enough like perl to be mistaken for it, but it's missing
      semicolons.

      The while loop never opens, either. I'm not sure if you've left anything
      out, but it's possible this is perl code.

      FetchRow() looks to be a function generated by the $webhistb object. It
      could do anything, but at a rough guess, I'd say this was a part of a
      script to parse a server logfile into a database.

      N





      "don94579"

      01/11/2002 08:29 AM
      Please respond to perl-beginner


      To: perl-beginner@yahoogroups.com
      cc:
      Subject: [PBML] Is his Perl code?


      Does anyone know if this is Perl code?
      To what language does FetchRow() belong?


      if( $server1->Sql( "select * from table22 where name = '$name' "))

      while ($webhistb->FetchRow())

      Thanks,
      Don




      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/







      _________________________________________________________________________________

      This email contains confidential information intended only for the person named above and may be subject to legal privilege. If you are not the intended recipient, any disclosure, copying or use of this information is prohibited. The Department provides no guarantee that this communication is free of virus or that it has not been intercepted or interfered with. If you have received this email in error or have any other concerns regarding its transmission, please notify Postmaster@...
      _________________________________________________________________________________



      ________________________________________________________________________
      ________________________________________________________________________

      Message: 12
      Date: Thu, 31 Oct 2002 13:42:20 -0800
      From: "prakash"

      Subject: RE: Is his Perl code?

      > Does anyone know if this is Perl code?

      Yes this is perl code

      > To what language does FetchRow() belong?
      >

      FetchRow() does not belong to any language it is user defined method..
      $webhistb is the object of some class which u have to check where they are
      instantiating
      the object.. (they use perl module )

      >
      > if( $server1->Sql( "select * from table22 where name = '$name' "))
      >
      > while ($webhistb->FetchRow())
      >
      > Thanks,
      > Don
      >
      >
      >
      >
      > 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/


      ______________________________________________________
      This email was pre-scanned by Spam Guardian
      A Service Provided by www.foothill.net and FNFmail.com




      ________________________________________________________________________
      ________________________________________________________________________

      Message: 13
      Date: Thu, 31 Oct 2002 22:49:15 -0000
      From: "dmaltez2002"
      Subject: Regex - pattern matching

      Hello everyone,
      I don't know too much about perl programming so please excuse me if
      this is a dumb question.
      I'm writing a program that reads two files. Each file has 2 or more
      lines. I'm trying to get a pattern that would search for words that
      are found in the two files and prints them out ot an output file
      (i.e. file1 "The book got wet when it fell."; file2 "When she closed
      the door, it broke.". I should find the words "the", "when"
      and "it".)

      I'm able to extract all the words from file2 and I can't extract the
      words from fil1, but I'm not sure how to compare the two files and
      extract the common words.

      This is what I have so far.

      open(INPUT1, 'open(INPUT2, '
      open(OUTPUT, '>outputfile.out') || die ("Error $!\n");;

      while ($secondtext = [input] )
      {
      $secondtext =~ m/\b(\S+)\b/ig;
      $sectemp = $1; # if I put this it just extracts the first match

      while ($origtext = [input] )
      {
      $origtext =~ m/$secondtext/g;
      $origtemp = $1;
      if ($sectemp eq $origtemp)
      {
      print "the word $sectemp was found \n";
      }
      }
      }

      I'm completely lost. Can you give me some hints.
      Thanks,
      Maltez








      ________________________________________________________________________
      ________________________________________________________________________

      Message: 14
      Date: Thu, 31 Oct 2002 22:44:17 -0600
      From: "Charles K. Clarkson"
      Subject: RE: Process binary files

      matt_johnsson [matt_johnsson@...] wrote:
      :
      : I have a perl script that processes a binary file with
      : variable length records in it. I'm trying to split it
      : into several binary files, one per record found (using
      : a part of the data to build the filename).

      : Each record starts with the string "HEADER". My script
      : does that but it does it in a very slow and ugly way,
      : I'm sure you will all agree... Could I please have
      : some ideas on how to do it better and faster!

      === message truncated ===


      ---------------------------------
      Post your free ad now! Yahoo! Canada Personals


      [Non-text portions of this message have been removed]
    • Jenda Krynicky
      From: Valerie Fortin Subject: Re: [PBML] Digest Number 1010 ... 1) This is a Perl group. Not a VB one! Go
      Message 2 of 3 , Nov 1, 2002
      • 0 Attachment
        From: Valerie Fortin <bandit_spirit@...>
        Subject: Re: [PBML] Digest Number 1010
        > Hi there,
        > I am just starting out with VB and I am no too sure how to do this but
        > I am doing a program with MDI forms. The program is soppsed to output
        > the number of good items in a production line and number of bad items
        > in the production line.It supposed to reco rd these numbers. I am to
        > have (2) forms: the second form is to diplay the output and MDI
        > form. I would apreciate all the help i can get bandit_spirit
        >
        > Unsubscribing info is here:
        > http://help.yahoo.com/help/us/groups/groups-32.html
        > ----------------------------------------------------------------------
        > --
        >
        > There are 16 messages in this issue.
        > ...

        1) This is a Perl group. Not a VB one! Go elsewhere.

        2) Never ever reply to a digest without changing the subject line and
        deleting most of the digest. If you reply to something then you
        should ONLY quote as much of the original message as necessary.

        3) Your question was not related to any of the messages in the
        digest. Why the heck are you replying to it then? Don't you know how
        to create a new message or what?

        Jenda
        == Jenda@... == http://Jenda.Krynicky.cz ==
        : What do people think?
        What, do people think? :-)
        -- Larry Wall in <199808071736.KAA12738@...>
      • Greg
        ... how ... ===================================================== I strongly suspect it s what - LOL G
        Message 3 of 3 , Nov 1, 2002
        • 0 Attachment
          --- In perl-beginner@y..., "Jenda Krynicky" <Jenda@K...> wrote:
          > 3) Your question was not related to any of the messages in the
          > digest. Why the heck are you replying to it then? Don't you know
          how
          > to create a new message or what?
          >
          =====================================================
          I strongly suspect it's 'what' - LOL

          G
        Your message has been successfully submitted and would be delivered to recipients shortly.