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

Re: [PBML] LIST A DIRECTORY

Expand Messages
  • Peter L. Berghold
    ... Hash: SHA1 ... Abraham, What have you tried and have had fail? This is a fairly straightforward and simple problem and the ways of doing this are legion.
    Message 1 of 10 , Feb 1, 2006
    • 0 Attachment
      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      Abraham Gonz?lez wrote:
      >
      > How I can get the files of a directory, how i can store the list in an
      > array?
      >
      >
      Abraham,


      What have you tried and have had fail? This is a fairly
      straightforward and simple problem and the ways of doing this are legion.


      Take a look a the documentation for the opendir and readdir system
      calls. That might give you a "leg up."




      - --
      ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
      Peter L. Berghold Peter@...
      "Those who fail to learn from history are condemned to repeat it."
      AIM: redcowdawg Yahoo IM: blue_cowdawg ICQ: 11455958
      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1.2.6 (GNU/Linux)
      Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

      iD8DBQFD4SHYUM9/01RIhaARAjLCAKCnyQlicBKYJTvB6s0AsjGC0OYYVQCghRgD
      3AuLh8M5nk5eMSFbLqSC344=
      =gq21
      -----END PGP SIGNATURE-----


      [Non-text portions of this message have been removed]
    • acummingsus
      ... http://groups.yahoo.com/group/perl-beginner/message/22608 For starters, there s a recent thread that I know about. my (acummingsus) script puts names of
      Message 2 of 10 , Feb 1, 2006
      • 0 Attachment
        --- In perl-beginner@yahoogroups.com, Abraham González
        <gcc.abraham@...> wrote:
        > How I can get the files of a directory, how i can store the list in an
        > array?

        http://groups.yahoo.com/group/perl-beginner/message/22608

        For starters, there's a recent thread that I know about. my
        (acummingsus) script puts names of files into array even though it
        uses the Unix find utility.

        I suggest that you learn to follow Randal's advice.

        Also, possibly search the archives for relevant terms.

        --
        Alan.
      • Frank Kleinburg (el Oso de Tejas)
        ... Also, spend the coin and get yourself a copy of Learning Perl on Win32 .. Winders environments can cause you much grief.. Trust me on that one.. flk k
        Message 3 of 10 , Feb 2, 2006
        • 0 Attachment
          At 01:35 AM 2/2/2006, you wrote:
          >--- In perl-beginner@yahoogroups.com, Abraham González
          ><gcc.abraham@...> wrote:
          >> How I can get the files of a directory, how i can store the list in an
          >> array?
          >
          >http://groups.yahoo.com/group/perl-beginner/message/22608
          >
          >For starters, there's a recent thread that I know about. my
          >(acummingsus) script puts names of files into array even though it
          >uses the Unix find utility.
          >
          >I suggest that you learn to follow Randal's advice.
          >
          >Also, possibly search the archives for relevant terms.

          Also, spend the coin and get yourself a copy of "Learning Perl on Win32"..
          Winders environments can cause you much grief.. Trust me on that one.. flk k
        • jabir ahmed
          try this I use File::Searcher; my $search = File::Searcher- new( *.cgi ); $search- add_expression(name= street , search= 1234 Easy St. , replace= 456 Hard
          Message 4 of 10 , Feb 2, 2006
          • 0 Attachment
            try this
            I

            use File::Searcher;
            my $search = File::Searcher->new('*.cgi');
            $search->add_expression(name=>'street',
            search=>'1234 Easy St.',
            replace=>'456 Hard Way',
            options=>'i');
            $search->add_expression(name=>'department',
            search=>'(Dept\.|Department)(\s+)(\d+)',
            replace=>'$1$2$3',
            options=>'im');
            $search->add_expression(name=>'place',
            search=>'Portland, OR(.*?)97212',
            replace=>'Vicksburg, MI${1}49097',
            options=>'is');
            $search->start;
            # $search->interactive; SEE File::Searcher::Interactive
            @files_matched = $search->files_matched;
            print "Files Matched\n";
            print "\t" . join("\n\t", @files_matched) . "\n";
            print "Total Files:\t" . $search->file_cnt . "\n";
            print "Directories:\t" . $search->dir_cnt . "\n";
            my @files_replaced = $search->expression('street')->files_replaced;
            my @files_replaced = $search->expression($expression)->files_replaced;
            my %matches = $search->expression('street')->matches;
            my %replacements = $search->expression('street')->replacements;


            On 2/2/06, Abraham González <gcc.abraham@...> wrote:
            >
            > Hello to all
            >
            > How I can get the files of a directory, how i can store the list in an
            > array?
            >
            > By example: if I need to know all the files contained in c:\windows?
            >
            > regards
            >
            > Abraham
            >
            >
            > [Non-text portions of this message have been removed]
            >


            [Non-text portions of this message have been removed]
          • Abraham González
            THANKS TO ALL ... -- Abraham González C. gcc.abraham@gmail.com VISITA MI ESPACIO EN MSN http://spaces.msn.com/members/gccabraham/ [Non-text portions of this
            Message 5 of 10 , Feb 2, 2006
            • 0 Attachment
              THANKS TO ALL

              2006/2/2, jabir ahmed <jabirahmed@...>:
              >
              > try this
              > I
              >
              > use File::Searcher;
              > my $search = File::Searcher->new('*.cgi');
              > $search->add_expression(name=>'street',
              > search=>'1234 Easy St.',
              > replace=>'456 Hard Way',
              > options=>'i');
              > $search->add_expression(name=>'department',
              > search=>'(Dept\.|Department)(\s+)(\d+)',
              > replace=>'$1$2$3',
              > options=>'im');
              > $search->add_expression(name=>'place',
              > search=>'Portland, OR(.*?)97212',
              > replace=>'Vicksburg, MI${1}49097',
              > options=>'is');
              > $search->start;
              > # $search->interactive; SEE File::Searcher::Interactive
              > @files_matched = $search->files_matched;
              > print "Files Matched\n";
              > print "\t" . join("\n\t", @files_matched) . "\n";
              > print "Total Files:\t" . $search->file_cnt . "\n";
              > print "Directories:\t" . $search->dir_cnt . "\n";
              > my @files_replaced = $search->expression('street')->files_replaced;
              > my @files_replaced =
              > $search->expression($expression)->files_replaced;
              > my %matches = $search->expression('street')->matches;
              > my %replacements = $search->expression('street')->replacements;
              >
              >
              > On 2/2/06, Abraham González <gcc.abraham@...> wrote:
              > >
              > > Hello to all
              > >
              > > How I can get the files of a directory, how i can store the list in an
              > > array?
              > >
              > > By example: if I need to know all the files contained in c:\windows?
              > >
              > > regards
              > >
              > > Abraham
              > >
              > >
              > > [Non-text portions of this message have been removed]
              > >
              >
              >
              > [Non-text portions of this message have been removed]
              >
              >
              >
              > Unsubscribing info is here:
              > http://help.yahoo.com/help/us/groups/groups-32.html
              > Yahoo! Groups Links
              >
              >
              >
              >
              >
              >
              >
              >


              --
              Abraham González C.
              gcc.abraham@...

              VISITA MI ESPACIO EN MSN http://spaces.msn.com/members/gccabraham/


              [Non-text portions of this message have been removed]
            • merlyn@stonehenge.com
              ... Frank Also, spend the coin and get yourself a copy of Learning Perl on Frank Win32 .. Winders environments can cause you much grief.. Trust me on
              Message 6 of 10 , Feb 2, 2006
              • 0 Attachment
                >>>>> "Frank" == Frank Kleinburg (el Oso de Tejas) <fkleinbu@...> writes:

                Frank> Also, spend the coin and get yourself a copy of "Learning Perl on
                Frank> Win32".. Winders environments can cause you much grief.. Trust me on
                Frank> that one.. flk k

                "Learning Perl" 3rd or 4th edition makes that book obsolete, and teaches many
                more topics in a better way. The only reason the win32 book is still being
                printed is *people keep buying it*. Yeah, it's crazy. But trust me... there
                is no need for that book any more! Learning Perl 2nd edition was Unix-biased,
                and the win32 book was released to help "the other folks". But starting
                with the third edition, everything was designed to be platform neutral.

                --
                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!
              • Abraham González
                What you think about the book: Professional Perl Programming? Regards! ... -- Abraham González C. gcc.abraham@gmail.com VISITA MI ESPACIO EN MSN
                Message 7 of 10 , Feb 2, 2006
                • 0 Attachment
                  What you think about the book: Professional Perl Programming?

                  Regards!


                  02 Feb 2006 06:59:40 -0800, merlyn@... <merlyn@...>:
                  >
                  > >>>>> "Frank" == Frank Kleinburg (el Oso de Tejas) <fkleinbu@...>
                  > writes:
                  >
                  > Frank> Also, spend the coin and get yourself a copy of "Learning Perl on
                  > Frank> Win32".. Winders environments can cause you much grief.. Trust me
                  > on
                  > Frank> that one.. flk k
                  >
                  > "Learning Perl" 3rd or 4th edition makes that book obsolete, and teaches
                  > many
                  > more topics in a better way. The only reason the win32 book is still
                  > being
                  > printed is *people keep buying it*. Yeah, it's crazy. But trust me...
                  > there
                  > is no need for that book any more! Learning Perl 2nd edition was
                  > Unix-biased,
                  > and the win32 book was released to help "the other folks". But starting
                  > with the third edition, everything was designed to be platform neutral.
                  >
                  > --
                  > 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!
                  >
                  >
                  > Unsubscribing info is here:
                  > http://help.yahoo.com/help/us/groups/groups-32.html
                  > Yahoo! Groups Links
                  >
                  >
                  >
                  >
                  >
                  >
                  >


                  --
                  Abraham González C.
                  gcc.abraham@...

                  VISITA MI ESPACIO EN MSN http://spaces.msn.com/members/gccabraham/


                  [Non-text portions of this message have been removed]
                • Prasanna Goupal
                  Dear All, I am facing problem in releted to Apache configuration. Problem is I am working on PHP code written by some one else. This PHP code contains code
                  Message 8 of 10 , Feb 5, 2006
                  • 0 Attachment
                    Dear All,

                    I am facing problem in releted to Apache configuration.

                    Problem is

                    I am working on PHP code written by some one else. This PHP code contains code which check URL from which request come. If request comes from perticular URL then only it allows that perticular user otherwise not

                    But in case of new server setup, i have external as well as internal IP for that server and i cant access this site on the basis of external IP ( as per our network setup) in my local network.

                    So which IP shd i mentioned in this php code which check url from which request comes.

                    In short, i cant acces this site on the basis of external ip of that server and there is code which checks requested URL. So which IP shd i mentioned in that code,

                    If any one has idea about this, then please reply me.

                    Thanks.

                    Regards,
                    Prasanna Goupal



                    ---------------------------------
                    Brings words and photos together (easily) with
                    PhotoMail - it's free and works with Yahoo! Mail.

                    [Non-text portions of this message have been removed]
                  • Paul Archer
                    This is a Perl mailing list--and not even the Perl-CGI list, which deals with issues more like what you re describing. Try a PHP or Apache or CGI mailing list.
                    Message 9 of 10 , Feb 6, 2006
                    • 0 Attachment
                      This is a Perl mailing list--and not even the Perl-CGI list, which deals
                      with issues more like what you're describing.
                      Try a PHP or Apache or CGI mailing list. This isn't really appropriate here.


                      Yesterday, Prasanna Goupal wrote:

                      > Dear All,
                      >
                      > I am facing problem in releted to Apache configuration.
                      >
                      > Problem is
                      >
                      > I am working on PHP code written by some one else. This PHP code contains code which check URL from which request come. If request comes from perticular URL then only it allows that perticular user otherwise not
                      >
                      > But in case of new server setup, i have external as well as internal IP for that server and i cant access this site on the basis of external IP ( as per our network setup) in my local network.
                      >
                      > So which IP shd i mentioned in this php code which check url from which request comes.
                      >
                      > In short, i cant acces this site on the basis of external ip of that server and there is code which checks requested URL. So which IP shd i mentioned in that code,
                      >
                      > If any one has idea about this, then please reply me.
                      >
                      > Thanks.
                      >
                      > Regards,
                      > Prasanna Goupal
                      >
                      >
                      >
                      > ---------------------------------
                      > Brings words and photos together (easily) with
                      > PhotoMail - it's free and works with Yahoo! Mail.
                      >
                      > [Non-text portions of this message have been removed]
                      >
                      >
                      >
                      > Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html
                      > Yahoo! Groups Links
                      >
                      >
                      >
                      >
                      >
                      >



                      ----------------The truth about Smokey the Bear-----------------
                      The following letter to the editor appeared in the Boston Globe:
                      In a recent column Susan Trausch [Globe columnist] referred to
                      Smokey the Bear. It is true that Smokey the Bear deserves praise
                      for his campaign against forest fires. But nobody ever mentions
                      the boy scouts he kills for their hats.
                      ----------------------------------------------------------------
                    Your message has been successfully submitted and would be delivered to recipients shortly.