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

Query

Expand Messages
  • mona_sule
    Hi I am a HR person would like to ask a query on the following skill: What is Perl Script and how it is diiferent from CGI Perl or Perl. And is it platfrom
    Message 1 of 25 , Dec 24, 2003
    • 0 Attachment
      Hi

      I am a HR person would like to ask a query on the following skill:
      What is Perl Script and how it is diiferent from CGI Perl or Perl.
      And is it platfrom specific, or how it is use on Unix platfrom. Pls
      don't reply with technical details just explain me in laymans words.

      Rgds
      Monica
    • franki
      ... Perl is an interpreted language, meaning that it doesn t need to compile till its actually being run.. Meaning that you are always working with human
      Message 2 of 25 , Dec 24, 2003
      • 0 Attachment
        mona_sule wrote:
        > Hi
        >
        > I am a HR person would like to ask a query on the following skill:
        > What is Perl Script and how it is diiferent from CGI Perl or Perl.
        > And is it platfrom specific, or how it is use on Unix platfrom. Pls
        > don't reply with technical details just explain me in laymans words.
        >
        > Rgds
        > Monica

        Perl is an interpreted language, meaning that it doesn't need to compile
        till its actually being run..
        Meaning that you are always working with human readable code instead of
        binary executables.
        That alone makes it much faster to develop in then other languages like
        Java, C++ etc.
        When you speak of "Perl" you might be talking about the actual Perl
        binary that does the interpreting of scripts, or the overall language
        itself..

        A Perl script is basically a text file containing Perl instructions that
        are executed by the Perl interpreter at run time.

        A Perl CGI script is a Perl script that is designed to receive and
        return output to/from the end users web browser rather then the command
        line of the server, (usually using mod_CGI on Apache.) but versions are
        also available that work fine with Microsoft IIS and most other web servers.

        Perl is very crossplatform and can run on nearly anything.. Perl is
        available for all versions of Unix, Windows, Mac OSX.x etc...

        In short, Perl is a high level interpreted language that can be used on
        the command line, via a web server and CGI (Common Gateway Interface) ,
        its cross platform and can do anything from a ecommerce shopping cart to
        a word processor (if you are that way inclined.)





        regards

        Franki
      • Paul Archer
        Or, to answer in a different fashion: If someone says they have (or are looking for) Perl, Perl scripting, or Perl programming experience, that s all pretty
        Message 3 of 25 , Dec 24, 2003
        • 0 Attachment
          Or, to answer in a different fashion: If someone says they have (or are
          looking for) Perl, Perl scripting, or Perl programming experience, that's
          all pretty much the same thing (competency writing and debugging perl
          scripts/programs (either term works here)). If they mention CGI Perl (or you
          *might* run across Mason or mod_perl, which are variations on a theme (for a
          recruiter's purposes, guys; I know they're vastly different from each
          other)), then they're talking about web development using Perl. So that's
          partly knowing Perl and partly knowing web servers and CGI.
          If someone knows Perl in general, they may not have CGI/web development
          experience, but if they have 'CGI Perl', then they know Perl, but
          their knowledge in Perl may very focused on that one area. (Not really any
          different than a C programmer who has spent many years dealing with
          databases; that person would be just as focused.)


          HTH,

          Paul


          5:48pm, franki wrote:

          > mona_sule wrote:
          > > Hi
          > >
          > > I am a HR person would like to ask a query on the following skill:
          > > What is Perl Script and how it is diiferent from CGI Perl or Perl.
          > > And is it platfrom specific, or how it is use on Unix platfrom. Pls
          > > don't reply with technical details just explain me in laymans words.
          > >
          > > Rgds
          > > Monica
          >
          > Perl is an interpreted language, meaning that it doesn't need to compile
          > till its actually being run..
          > Meaning that you are always working with human readable code instead of
          > binary executables.
          > That alone makes it much faster to develop in then other languages like
          > Java, C++ etc.
          > When you speak of "Perl" you might be talking about the actual Perl
          > binary that does the interpreting of scripts, or the overall language
          > itself..
          >
          > A Perl script is basically a text file containing Perl instructions that
          > are executed by the Perl interpreter at run time.
          >
          > A Perl CGI script is a Perl script that is designed to receive and
          > return output to/from the end users web browser rather then the command
          > line of the server, (usually using mod_CGI on Apache.) but versions are
          > also available that work fine with Microsoft IIS and most other web servers.
          >
          > Perl is very crossplatform and can run on nearly anything.. Perl is
          > available for all versions of Unix, Windows, Mac OSX.x etc...
          >
          > In short, Perl is a high level interpreted language that can be used on
          > the command line, via a web server and CGI (Common Gateway Interface) ,
          > its cross platform and can do anything from a ecommerce shopping cart to
          > a word processor (if you are that way inclined.)
          >
          >
          >
          >
          >
          > regards
          >
          > Franki
          >
          >
          >
          > Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html
          >
          > Yahoo! Groups Links
          >
          > To visit your group on the web, go to:
          > http://groups.yahoo.com/group/perl-beginner/
          >
          > To unsubscribe from this group, send an email to:
          > perl-beginner-unsubscribe@yahoogroups.com
          >
          > Your use of Yahoo! Groups is subject to:
          > http://docs.yahoo.com/info/terms/
          >
          >

          ------------------------------------------------
          "Isn't that breaking and entering?"
          "Oh, pish. It can't be a crime if it's catered!"
          ------------------------------------------------
        • John S Brigham
          My input: With a background and perspective from HRO, you are not going to be able to pick the best candidate within the field of applicants for a
          Message 4 of 25 , Dec 24, 2003
          • 0 Attachment
            My input: With a background and perspective from HRO, you are not
            going to be able to pick the best candidate within the field of
            applicants for a programming position. Bring your own MIS persons into
            the process. Consider hiring a consultant.

            John in Denver



            On Wed, 24 Dec 2003 09:22:02 -0000 "mona_sule" <mona_sule@...>
            writes:
            > Hi
            >
            > I am a HR person would like to ask a query on the following skill:
            > What is Perl Script and how it is diiferent from CGI Perl or Perl.
            > And is it platfrom specific, or how it is use on Unix platfrom. Pls
            >
            > don't reply with technical details just explain me in laymans
            > words.
            >
            > Rgds
            > Monica
            >
            >
            > Unsubscribing info is here:
            > http://help.yahoo.com/help/us/groups/groups-32.html
            >
            > Yahoo! Groups Links
            >
            > To visit your group on the web, go to:
            > http://groups.yahoo.com/group/perl-beginner/
            >
            > To unsubscribe from this group, send an email to:
            > perl-beginner-unsubscribe@yahoogroups.com
            >
            > Your use of Yahoo! Groups is subject to:
            > http://docs.yahoo.com/info/terms/
            >
            >
            >
            >

            ________________________________________________________________
            The best thing to hit the internet in years - Juno SpeedBand!
            Surf the web up to FIVE TIMES FASTER!
            Only $14.95/ month - visit www.juno.com to sign up today!
          • merlyn@stonehenge.com
            ... mona I am a HR person would like to ask a query on the following skill: mona What is Perl Script and how it is diiferent from CGI Perl or Perl. mona And
            Message 5 of 25 , Dec 24, 2003
            • 0 Attachment
              >>>>> "mona" == mona sule <mona_sule@...> writes:

              mona> I am a HR person would like to ask a query on the following skill:
              mona> What is Perl Script and how it is diiferent from CGI Perl or Perl.
              mona> And is it platfrom specific, or how it is use on Unix platfrom. Pls
              mona> don't reply with technical details just explain me in laymans words.

              To add to what's been said:

              Perl has been around since before "the web", back then primarily a
              tool of Unix System Administrators to provide custom solutions to
              common (and unique) tasks easily. These tasks typically consist of
              managing the files and folders of a system, modifying the configration
              of the system, or monitoring the health of the system as it operates.
              Let's call this "system administration with Perl".

              Perl also grew into a general purpose data manipulation language,
              similar to how you might use Excel to wrestle large amounts of numbers
              into summary information. Perl is particularly suited to being able
              to get and put data from nearly everywhere (including large databases
              or web screen scraping), and then analyze and "reduce" the data to
              useful results. In particular, Perl today is the choice language for
              bioinformaticists, such as the people working on the Human Genome
              project and other places where large amounts of data is being
              generated and needed in various incompatible formats; Perl provides
              the glue to get it from one format to another, and to manage and
              monitor the processing of such data. Let's call this "data wrangling
              with Perl".

              As the web came along, interactivity became the key for a good web
              site. The "CGI" interface permits a program to be triggered by the
              fetching of a URL, but in any language. Because Perl was already
              deployed on most of the systems that started hosting websites, it
              became the language of choice for CGI scripting. Although detailed
              Perl knowledge wasn't needed, CGI Perl hackers needed to know how the
              web worked as well. Because CGI doesn't scale to many hits per second
              (no matter what language you write the CGI program in), the tasks tend
              to be simple though. Let's call this "CGI Perl".

              Finally, as web applications grew larger, for things like "match.com"
              that has many pages that have related data talking to large databases
              with many hits per second, Perl also mutated into a web-server
              scripting language called mod_perl, which acts like ASP or JSP or PHP.
              Many large websites that you visit use this: match.com,
              ticketmaster.com, citysearch.com, sportsline.com, imdb.com,
              travelocity.com, and so on. Amazon.com is moving to this very soon as
              well. There are also common application frameworks being used with
              mod_perl: Mason, Template Toolkit, OpenInteract, EmbPerl, and so on.
              Call this "mod_perl application development".

              So that's the 4 basic categories of Perl programmer. There's a lot of
              overlap (the mod_perl programmer must know everything a CGI Perl
              programmer knows, and more, for example), but there are also unique
              skills in each area.

              When a manager asks you for a "perl" person, or someone says "I know
              Perl", please ask "what kind of Perl". That will help you weed out
              the person's experience.

              But as one person said, and I agree, testing for Perl knowledge is
              best left to the people who know Perl already. If you don't have that
              kind of expertise in-house, you can hire an outside consulting firm
              (like Stonehenge) to assist you in the process.

              --
              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!
            • mario@chamorro.us
              ... here s my simple explanation: PERL: a programming language PERL/CGI: a version of the language for the web PERL/DBI: a version for database access PERL
              Message 6 of 25 , Dec 24, 2003
              • 0 Attachment
                --- "mona_sule" <mona_sule@y...> wrote:
                > I am a HR person would like to ask a query on the following skill:
                > What is Perl Script and how it is diiferent from CGI Perl or Perl.
                > And is it platfrom specific, or how it is use on Unix platfrom. Pls
                > don't reply with technical details just explain me in laymans words.
                > Rgds Monica

                here's my simple explanation:

                PERL: a programming language
                PERL/CGI: a version of the language for the web
                PERL/DBI: a version for database access
                PERL script: a program written in that language

                a PERL script can run within
                Unix (usual) or Windows (ActiveState version)

                like everyone says, you might want to get a tech to do
                a phone screening for you. truly technical people will
                be more humble about their abilities, wheras poseurs
                will be more boastful, and straight up lie.

                -- Mario
              • Jenda Krynicky
                From: mona_sule ... Others gave you a lot of info already, just a note ... you might mean PerlScript (note the absence of the space)
                Message 7 of 25 , Dec 30, 2003
                • 0 Attachment
                  From: "mona_sule" <mona_sule@...>
                  > I am a HR person would like to ask a query on the following skill:
                  > What is Perl Script and how it is diiferent from CGI Perl or Perl. And
                  > is it platfrom specific, or how it is use on Unix platfrom. Pls don't
                  > reply with technical details just explain me in laymans words.

                  Others gave you a lot of info already, just a note ... you might mean
                  PerlScript (note the absence of the space) ... which is the name
                  activestate.com uses for their Perl interpretor allowing you to use
                  Perl within ASPs, in the web browser, Windows Scripting Host and
                  other similar places. It's not in any way different from ordinary
                  Perl, PerlScript is just the name of the software.

                  Jenda
                  ===== Jenda@... === http://Jenda.Krynicky.cz =====
                  When it comes to wine, women and song, wizards are allowed
                  to get drunk and croon as much as they like.
                  -- Terry Pratchett in Sourcery
                • Mark Reed
                  Either your confused or I am :-). Your right PerlScript is an activestate invention, but it is not in itself a perl interpreter. Nor is it what they call
                  Message 8 of 25 , Dec 30, 2003
                  • 0 Attachment
                    Either your confused or I am :-). Your right
                    "PerlScript" is an activestate invention, but it is
                    not in itself a perl interpreter. Nor is it what they
                    call their interpreter. It is a client side scripting
                    language like javascript. So the difference between
                    "PerlScript" is that it's client side, where a CGI is
                    server side.

                    The active state "PerlScript" example is:

                    <HTML>
                    <HEAD>
                    <TITLE>PerlScript Hello World!</TITLE>
                    </HEAD>
                    <BODY BGCOLOR="#FFFFFF">
                    <h2>PerlScript Hello world!</h2>
                    <SCRIPT LANGUAGE="PerlScript">
                    $window->document->write('Hello world!');
                    </SCRIPT>
                    </BODY>
                    </HTML>

                    My personal opinion is "PerlScript" is junk, as it can
                    only be used on MicroCrap platforms. See:

                    http://aspn.activestate.com/ASPN/docs/ActivePerl/Components/Windows/PerlScript.html#what_is_perlscript

                    For more information.

                    Mark


                    --- Jenda Krynicky <Jenda@...> wrote:
                    > From: "mona_sule" <mona_sule@...>
                    > > I am a HR person would like to ask a query on the
                    > following skill:
                    > > What is Perl Script and how it is diiferent from
                    > CGI Perl or Perl. And
                    > > is it platfrom specific, or how it is use on Unix
                    > platfrom. Pls don't
                    > > reply with technical details just explain me in
                    > laymans words.
                    >
                    > Others gave you a lot of info already, just a note
                    > ... you might mean
                    > PerlScript (note the absence of the space) ... which
                    > is the name
                    > activestate.com uses for their Perl interpretor
                    > allowing you to use
                    > Perl within ASPs, in the web browser, Windows
                    > Scripting Host and
                    > other similar places. It's not in any way different
                    > from ordinary
                    > Perl, PerlScript is just the name of the software.
                    >
                    > Jenda
                    > ===== Jenda@... === http://Jenda.Krynicky.cz
                    > =====
                    > When it comes to wine, women and song, wizards are
                    > allowed
                    > to get drunk and croon as much as they like.
                    > -- Terry Pratchett in Sourcery
                    >
                    >


                    __________________________________
                    Do you Yahoo!?
                    Protect your identity with Yahoo! Mail AddressGuard
                    http://antispam.yahoo.com/whatsnewfree
                  • Charles K. Clarkson
                    ... PerlScript *can* be run from the server side under IIS. I web master a site that uses IIS 6.0. I have enhanced a lot of the server side VBScript with
                    Message 9 of 25 , Dec 30, 2003
                    • 0 Attachment
                      Mark Reed <intensity_guy@...> wrote:
                      :
                      : Either your confused or I am :-). Your right
                      : "PerlScript" is an activestate invention, but it is
                      : not in itself a perl interpreter. Nor is it what they
                      : call their interpreter. It is a client side scripting
                      : language like javascript. So the difference between
                      : "PerlScript" is that it's client side, where a CGI is
                      : server side.

                      PerlScript *can* be run from the server side under
                      IIS. I web master a site that uses IIS 6.0. I have
                      enhanced a lot of the server side VBScript with
                      PerlScript functions. Under IIS the languages can call
                      each others functions and use each others variables.

                      I enjoy using server side PerlScript. It can use
                      server objects and ODBC just like the more popular
                      VBScript and Jscript (which are also server side
                      languages under IIS). I can use the built-in Microsoft
                      objects to process forms and handle cookies or I can
                      use more familiar perl modules to do the same. And I
                      can still use CPAN modules for code reuse.


                      HTH,

                      Charles K. Clarkson
                      --
                      Head Bottle Washer,
                      Clarkson Energy Homes, Inc.
                      Mobile Home Specialists
                      254 968-8328
                    • Jenda Krynicky
                      From: Mark Reed ... I believe it s you who s confused. There is no language called PerlScript. ... No. If I was to talk in the proper
                      Message 10 of 25 , Jan 2, 2004
                      • 0 Attachment
                        From: Mark Reed <intensity_guy@...>
                        > Either your confused or I am :-). Your right
                        > "PerlScript" is an activestate invention, but it is
                        > not in itself a perl interpreter. Nor is it what they
                        > call their interpreter. It is a client side scripting
                        > language like javascript.

                        I believe it's you who's confused.

                        There is no language called PerlScript.

                        > So the difference between
                        > "PerlScript" is that it's client side, where a CGI is
                        > server side.

                        No.

                        If I was to talk in the proper terms PerlScript is a "scripting
                        engine" allowing you to use Perl from within any "scripting host".

                        The "scripting host" might be IIS (so then PerlScript would be run on
                        the server site, inside ASPs), Internet Explorer (so the code would
                        be client side), it might be WHS=Windows Scripting Host (thus not
                        related to web at all), it might be an MS Office app (I think, they
                        might have dumped this "thanks" to .Net) or one of the other hosts.

                        > The active state "PerlScript" example is:
                        >
                        > <HTML>
                        > <HEAD>
                        > <TITLE>PerlScript Hello World!</TITLE>
                        > </HEAD>
                        > <BODY BGCOLOR="#FFFFFF">
                        > <h2>PerlScript Hello world!</h2>
                        > <SCRIPT LANGUAGE="PerlScript">
                        > $window->document->write('Hello world!');
                        > </SCRIPT>
                        > </BODY>
                        > </HTML>

                        The LANGUAGE attribute of the <SCRIPT> is misleading. The language is
                        Perl, the only addition are a few objects predefined by the scripting
                        host. In this case by the Internet Explorer.

                        But you could just as well use PerlScript (the engine) to run Perl
                        (the language) inside ASP.

                        > My personal opinion is "PerlScript" is junk, as it can
                        > only be used on MicroCrap platforms. See:
                        >
                        > http://aspn.activestate.com/ASPN/docs/ActivePerl/Components/Windows/Pe
                        > rlScript.html#what_is_perlscript
                        >
                        > For more information.

                        Did you?

                        [quote]
                        PerlScript is an ActiveX scripting engine that allows you to use
                        Perl with any ActiveX scripting host.
                        [/quote]

                        Jenda
                        ===== Jenda@... === http://Jenda.Krynicky.cz =====
                        When it comes to wine, women and song, wizards are allowed
                        to get drunk and croon as much as they like.
                        -- Terry Pratchett in Sourcery
                      • Nirmal Modi
                        I have a problem regarding error below when I connect with Oracle by using perl script and DBI ERROR: can t locate loadable object for module DBD::Oracle in
                        Message 11 of 25 , Apr 21 3:31 AM
                        • 0 Attachment
                          I have a problem regarding error below when I connect
                          with Oracle by using perl script and DBI

                          ERROR: can't locate loadable object for module
                          DBD::Oracle in @INC........................





                          __________________________________________________
                          Do You Yahoo!?
                          Tired of spam? Yahoo! Mail has the best spam protection around
                          http://mail.yahoo.com
                        • Mike Southern
                          You need toinstall the dbd-oracle module
                          Message 12 of 25 , Apr 21 3:47 AM
                          • 0 Attachment
                            You need toinstall the dbd-oracle module


                            On 4/21/05 6:31 AM, Nirmal Modi at nkmodi_ce20@... wrote:

                            >
                            > I have a problem regarding error below when I connect
                            > with Oracle by using perl script and DBI
                            >
                            > ERROR: can't locate loadable object for module
                            > DBD::Oracle in @INC........................
                            >
                          • Odhiambo Washington
                            ... This is one of the modules that I have respect for installation wise! Gave me so much headache on FreeBSD and OS X. Anyway, depending on your OS, and if
                            Message 13 of 25 , Apr 21 3:47 AM
                            • 0 Attachment
                              * Nirmal Modi <nkmodi_ce20@...> [20050421 13:31]: wrote:
                              >
                              > I have a problem regarding error below when I connect
                              > with Oracle by using perl script and DBI
                              >
                              > ERROR: can't locate loadable object for module
                              > DBD::Oracle in @INC........................


                              This is one of the modules that I have respect for installation wise!
                              Gave me so much headache on FreeBSD and OS X.

                              Anyway, depending on your OS, and if you installed the CPAN module
                              with perl, you can do the following:

                              perl -MCPAN -e 'install DBD::Oracle'



                              -Wash

                              http://www.netmeister.org/news/learn2quote.html

                              --
                              +======================================================================+
                              |\ _,,,---,,_ | Odhiambo Washington <wash@...>
                              Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com
                              |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922
                              '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121
                              +======================================================================+
                              Due to circumstances beyond your control, you are master of your fate
                              and captain of your soul.
                            • balan.ranganathan@wipro.com
                              Hi All What is internal operation performed in the following statement? $decimal = 65+ a ; If I print the value of $decimal I get it as 65 . I thought there
                              Message 14 of 25 , Jan 17, 2006
                              • 0 Attachment
                                Hi All

                                What is internal operation performed in the following statement?



                                $decimal = 65+'a';



                                If I print the value of $decimal I get it as '65'.



                                I thought there might be some positional operations and so I swapped the
                                operands as



                                $decimal = 'a'+65;



                                Still I get '65'.



                                Please tell me the internal implementation.



                                Thanks



                                Best regards

                                Bala





                                [Non-text portions of this message have been removed]
                              • Shawn Corey
                                ... You are trying to add a string to a number. Perl first converts the string to an number then adds it. The string a is not a number, so Perl assigns it
                                Message 15 of 25 , Jan 17, 2006
                                • 0 Attachment
                                  balan.ranganathan@... wrote:
                                  > Hi All
                                  >
                                  > What is internal operation performed in the following statement?
                                  >
                                  > $decimal = 65+'a';
                                  >
                                  > If I print the value of $decimal I get it as '65'.
                                  >
                                  > I thought there might be some positional operations and so I swapped the
                                  > operands as
                                  >
                                  > $decimal = 'a'+65;
                                  >
                                  > Still I get '65'.
                                  >
                                  > Please tell me the internal implementation.

                                  You are trying to add a string to a number. Perl first converts the
                                  string to an number then adds it. The string 'a' is not a number, so
                                  Perl assigns it the value zero and adds it to 65, giving 65.

                                  Place these two statements at the top of all your programs. They will
                                  tell you when things go wrong.

                                  use strict;
                                  use warnings;

                                  --

                                  Just my 0.00000002 million dollars worth,
                                  --- Shawn

                                  "Probability is now one. Any problems that are left are your own."
                                  SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

                                  * Perl tutorials at http://perlmonks.org/?node=Tutorials
                                  * A searchable perldoc is available at http://perldoc.perl.org/
                                • Bill Walton
                                  Hi Shawn, I m a newbie trying to develop a better understanding of Perl s presumptions re: context. Would the result be the same if the OP used double quotes
                                  Message 16 of 25 , Jan 18, 2006
                                  • 0 Attachment
                                    Hi Shawn,

                                    I'm a newbie trying to develop a better understanding of Perl's presumptions re: context.

                                    Would the result be the same if the OP used double quotes rather than single quotes? How would Perl treat:

                                    $decimal = 65 + "a" ?

                                    What would be the result of Perl's interpolation of "a" ?

                                    Thanks,
                                    Bill
                                    ----- Original Message -----
                                    From: Shawn Corey
                                    To: perl-beginner@yahoogroups.com
                                    Sent: Tuesday, January 17, 2006 11:44 AM
                                    Subject: Re: [PBML] Query


                                    balan.ranganathan@... wrote:
                                    > Hi All
                                    >
                                    > What is internal operation performed in the following statement?
                                    >
                                    > $decimal = 65+'a';
                                    >
                                    > If I print the value of $decimal I get it as '65'.
                                    >
                                    > I thought there might be some positional operations and so I swapped the
                                    > operands as
                                    >
                                    > $decimal = 'a'+65;
                                    >
                                    > Still I get '65'.
                                    >
                                    > Please tell me the internal implementation.

                                    You are trying to add a string to a number. Perl first converts the
                                    string to an number then adds it. The string 'a' is not a number, so
                                    Perl assigns it the value zero and adds it to 65, giving 65.

                                    Place these two statements at the top of all your programs. They will
                                    tell you when things go wrong.

                                    use strict;
                                    use warnings;

                                    --

                                    Just my 0.00000002 million dollars worth,
                                    --- Shawn

                                    "Probability is now one. Any problems that are left are your own."
                                    SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

                                    * Perl tutorials at http://perlmonks.org/?node=Tutorials
                                    * A searchable perldoc is available at http://perldoc.perl.org/


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



                                    SPONSORED LINKS Basic programming language C programming language Computer programming languages
                                    The c programming language C programming language List of programming languages


                                    ------------------------------------------------------------------------------
                                    YAHOO! GROUPS LINKS

                                    a.. Visit your group "perl-beginner" on the web.

                                    b.. To unsubscribe from this group, send an email to:
                                    perl-beginner-unsubscribe@yahoogroups.com

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


                                    ------------------------------------------------------------------------------




                                    [Non-text portions of this message have been removed]
                                  • balan.ranganathan@wipro.com
                                    Hi Bill Here also the same case, again we get the same warning as Argument a isn t numeric in addition (+) . Still the answer is 65 . Thanks Best regards
                                    Message 17 of 25 , Jan 18, 2006
                                    • 0 Attachment
                                      Hi Bill

                                      Here also the same case, again we get the same warning as "Argument "a"
                                      isn't numeric in addition (+)".



                                      Still the answer is '65'.



                                      Thanks



                                      Best regards

                                      Bala



                                      ________________________________

                                      From: perl-beginner@yahoogroups.com
                                      [mailto:perl-beginner@yahoogroups.com] On Behalf Of Bill Walton
                                      Sent: Wednesday, January 18, 2006 7:59 PM
                                      To: perl-beginner@yahoogroups.com
                                      Subject: Re: [PBML] Query



                                      Hi Shawn,

                                      I'm a newbie trying to develop a better understanding of Perl's
                                      presumptions re: context.

                                      Would the result be the same if the OP used double quotes rather than
                                      single quotes? How would Perl treat:

                                      $decimal = 65 + "a" ?

                                      What would be the result of Perl's interpolation of "a" ?

                                      Thanks,
                                      Bill
                                      ----- Original Message -----
                                      From: Shawn Corey
                                      To: perl-beginner@yahoogroups.com
                                      Sent: Tuesday, January 17, 2006 11:44 AM
                                      Subject: Re: [PBML] Query


                                      balan.ranganathan@... wrote:
                                      > Hi All
                                      >
                                      > What is internal operation performed in the following statement?
                                      >
                                      > $decimal = 65+'a';
                                      >
                                      > If I print the value of $decimal I get it as '65'.
                                      >
                                      > I thought there might be some positional operations and so I swapped
                                      the
                                      > operands as
                                      >
                                      > $decimal = 'a'+65;
                                      >
                                      > Still I get '65'.
                                      >
                                      > Please tell me the internal implementation.

                                      You are trying to add a string to a number. Perl first converts the
                                      string to an number then adds it. The string 'a' is not a number, so
                                      Perl assigns it the value zero and adds it to 65, giving 65.

                                      Place these two statements at the top of all your programs. They will
                                      tell you when things go wrong.

                                      use strict;
                                      use warnings;

                                      --

                                      Just my 0.00000002 million dollars worth,
                                      --- Shawn

                                      "Probability is now one. Any problems that are left are your own."
                                      SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

                                      * Perl tutorials at http://perlmonks.org/?node=Tutorials
                                      * A searchable perldoc is available at http://perldoc.perl.org/


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



                                      SPONSORED LINKS Basic programming language C programming language
                                      Computer programming languages
                                      The c programming language C programming language List of
                                      programming languages


                                      ------------------------------------------------------------------------
                                      ------
                                      YAHOO! GROUPS LINKS

                                      a.. Visit your group "perl-beginner" on the web.

                                      b.. To unsubscribe from this group, send an email to:
                                      perl-beginner-unsubscribe@yahoogroups.com

                                      c.. 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




                                      SPONSORED LINKS

                                      Basic programming language
                                      <http://groups.yahoo.com/gads?t=ms&k=Basic+programming+language&w1=Basic
                                      +programming+language&w2=C+programming+language&w3=Computer+programming+
                                      languages&w4=The+c+programming+language&w5=C+++programming+language&w6=L
                                      ist+of+programming+languages&c=6&s=193&.sig=aLlETYEcZKW67uFZnuZPPw>

                                      C programming language
                                      <http://groups.yahoo.com/gads?t=ms&k=C+programming+language&w1=Basic+pro
                                      gramming+language&w2=C+programming+language&w3=Computer+programming+lang
                                      uages&w4=The+c+programming+language&w5=C+++programming+language&w6=List+
                                      of+programming+languages&c=6&s=193&.sig=n4wEVXDpIBKogo8e_G77cw>

                                      Computer programming languages
                                      <http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=B
                                      asic+programming+language&w2=C+programming+language&w3=Computer+programm
                                      ing+languages&w4=The+c+programming+language&w5=C+++programming+language&
                                      w6=List+of+programming+languages&c=6&s=193&.sig=KFl1CeQi7jrKmsK4WD6ygQ>


                                      The c programming language
                                      <http://groups.yahoo.com/gads?t=ms&k=The+c+programming+language&w1=Basic
                                      +programming+language&w2=C+programming+language&w3=Computer+programming+
                                      languages&w4=The+c+programming+language&w5=C+++programming+language&w6=L
                                      ist+of+programming+languages&c=6&s=193&.sig=lU9w7-4UlGPB4LjDy84c2Q>

                                      C programming language
                                      <http://groups.yahoo.com/gads?t=ms&k=C+++programming+language&w1=Basic+p
                                      rogramming+language&w2=C+programming+language&w3=Computer+programming+la
                                      nguages&w4=The+c+programming+language&w5=C+++programming+language&w6=Lis
                                      t+of+programming+languages&c=6&s=193&.sig=dtKotXT1Ne2N9AO_aEbPFQ>

                                      List of programming languages
                                      <http://groups.yahoo.com/gads?t=ms&k=List+of+programming+languages&w1=Ba
                                      sic+programming+language&w2=C+programming+language&w3=Computer+programmi
                                      ng+languages&w4=The+c+programming+language&w5=C+++programming+language&w
                                      6=List+of+programming+languages&c=6&s=193&.sig=0shmxLBHwrZWcSjC3QvZAA>



                                      ________________________________

                                      YAHOO! GROUPS LINKS



                                      * Visit your group "perl-beginner
                                      <http://groups.yahoo.com/group/perl-beginner> " on the web.

                                      * To unsubscribe from this group, send an email to:
                                      perl-beginner-unsubscribe@yahoogroups.com
                                      <mailto:perl-beginner-unsubscribe@yahoogroups.com?subject=Unsubscribe>

                                      * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
                                      Service <http://docs.yahoo.com/info/terms/> .



                                      ________________________________



                                      [Non-text portions of this message have been removed]
                                    • merlyn@stonehenge.com
                                      ... Bill Would the result be the same if the OP used double quotes rather than Bill single quotes? How would Perl treat: Bill $decimal = 65 + a ? Bill
                                      Message 18 of 25 , Jan 18, 2006
                                      • 0 Attachment
                                        >>>>> "Bill" == Bill Walton <bill.walton@...> writes:

                                        Bill> Would the result be the same if the OP used double quotes rather than
                                        Bill> single quotes? How would Perl treat:

                                        Bill> $decimal = 65 + "a" ?

                                        Bill> What would be the result of Perl's interpolation of "a" ?

                                        "a" in a numeric context is 0. Always.

                                        Doesn't matter if it's 'a' or "a". The only difference between single and
                                        double quotes is the interpolation (dollar, at-sign, and backslashes are
                                        interpreted differently).

                                        --
                                        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!
                                      • Shawn Corey
                                        ... The results would be the same. Perl has two types of literal strings: those that interpolate; and those that don t. But Perl has only one internal
                                        Message 19 of 25 , Jan 18, 2006
                                        • 0 Attachment
                                          Bill Walton wrote:
                                          > I'm a newbie trying to develop a better understanding of Perl's
                                          > presumptions re: context.
                                          >
                                          > Would the result be the same if the OP used double quotes rather than
                                          > single quotes? How would Perl treat:
                                          >
                                          > $decimal = 65 + "a" ?
                                          >
                                          > What would be the result of Perl's interpolation of "a" ?

                                          The results would be the same. Perl has two types of literal strings:
                                          those that interpolate; and those that don't. But Perl has only one
                                          internal representation, so the result of adding a number to the string
                                          is the same.

                                          For example:

                                          #!/usr/bin/perl

                                          use strict;
                                          use warnings;

                                          my $var = 3.14;

                                          my $string = 'var = $var';
                                          print "$string\n";

                                          $string = "var = $var";
                                          print "$string\n";

                                          __END__

                                          But now note what happens when the string is also a number.

                                          #!/usr/bin/perl

                                          use strict;
                                          use warnings;

                                          my $var = 65 + "000001.00000";
                                          print "$var\n";

                                          my $var = 65 + '000001.00000';
                                          print "$var\n";

                                          __END__


                                          --

                                          Just my 0.00000002 million dollars worth,
                                          --- Shawn

                                          "Probability is now one. Any problems that are left are your own."
                                          SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

                                          * Perl tutorials at http://perlmonks.org/?node=Tutorials
                                          * A searchable perldoc is available at http://perldoc.perl.org/
                                        • balan.ranganathan@wipro.com
                                          Hi I have a doubt in the interpretation of data types. I am doing some operations as mentioned in the below code, #!/usr/bin/perl use strict; use warnings; my
                                          Message 20 of 25 , Jan 19, 2006
                                          • 0 Attachment
                                            Hi

                                            I have a doubt in the interpretation of data types.



                                            I am doing some operations as mentioned in the below code,



                                            #!/usr/bin/perl



                                            use strict;

                                            use warnings;



                                            my %hash = ( "name"=>"bala",

                                            "age"=>"22"

                                            );



                                            my $var = %hash; #Assigning scalar with hash

                                            print "$var\n";





                                            Here I get the value of $val as 2/8.

                                            What does it mean?



                                            My observations so far are,



                                            Scalar = array # scalar value is size of array

                                            Array = hash # hash is converted to array

                                            Hash = array # array is converted to hash (provided array has even
                                            number of variables)



                                            Please help me out in finding the interpretation.



                                            Thanks



                                            Best regards

                                            Bala





                                            [Non-text portions of this message have been removed]
                                          • merlyn@stonehenge.com
                                            ... Balan my $var = %hash; #Assigning scalar with hash This is an internal value, not useful to you or me. Only useful if you are editing the *C* source
                                            Message 21 of 25 , Jan 19, 2006
                                            • 0 Attachment
                                              >>>>> "Balan" == <balan.ranganathan@...> writes:

                                              Balan> my $var = %hash; #Assigning scalar with hash

                                              This is an internal value, not useful to you or me. Only useful
                                              if you are editing the *C* source code that goes in to /usr/bin/perl.

                                              Just ignore it.

                                              --
                                              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!
                                            • Shawn Corey
                                              ... The following are equivalent: my $var = @array; my $var = scalar( @array ); and these are equivalent: my $var = %hash; my $var = scalar( %hash ); See
                                              Message 22 of 25 , Jan 20, 2006
                                              • 0 Attachment
                                                balan.ranganathan@... wrote:
                                                > my $var = %hash; #Assigning scalar with hash
                                                >
                                                > print "$var\n";
                                                > Here I get the value of $val as 2/8.
                                                >
                                                > What does it mean?

                                                The following are equivalent:

                                                my $var = @array;
                                                my $var = scalar( @array );

                                                and these are equivalent:

                                                my $var = %hash;
                                                my $var = scalar( %hash );

                                                See `perldoc -f scalar` for details. When you use an array or a hash in
                                                scalar context, Perl replaces them with their size. In your case the
                                                expression 2/8 means the hash has two elements and can hold up to 8
                                                before it is automatically resized.

                                                BTW, if you want a reference to the hash:

                                                my $var = \%hash;

                                                See `perldoc perlref` for details.


                                                --

                                                Just my 0.00000002 million dollars worth,
                                                --- Shawn

                                                "Probability is now one. Any problems that are left are your own."
                                                SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

                                                * Perl tutorials at http://perlmonks.org/?node=Tutorials
                                                * A searchable perldoc is available at http://perldoc.perl.org/
                                              • balan.ranganathan@wipro.com
                                                Hi I am not able to understand below regular expression. $nextname =~ s#.*/##; # remove part before last slash Can you please tell me how does the above
                                                Message 23 of 25 , Jan 24, 2006
                                                • 0 Attachment
                                                  Hi

                                                  I am not able to understand below regular expression.



                                                  $nextname =~ s#.*/##; # remove part before last slash


                                                  Can you please tell me how does the above expression works?


                                                  Please have a look at the below mentioned example.

                                                  #!/usr/bin/perl

                                                  while ($nextname = </etc/host*>) {
                                                  $nextname =~ s#.*/##; # remove part before last slash
                                                  print "one of the files is $nextname\n";
                                                  }


                                                  The output is :



                                                  one of the files is host.conf

                                                  one of the files is hosts

                                                  one of the files is hosts.allow

                                                  one of the files is hosts.canna

                                                  one of the files is hosts.deny



                                                  The operation is stripping the file name from the path (for ex:
                                                  /etc/hosts.conf).



                                                  Thanks



                                                  Best regards

                                                  Bala





                                                  [Non-text portions of this message have been removed]
                                                • Dermot Paikkos
                                                  In this case # is a delimiter. So s means substitute The first and 2nd # contain a regular expression; .* any character (expect a newline), zero or more times
                                                  Message 24 of 25 , Jan 24, 2006
                                                  • 0 Attachment
                                                    In this case # is a delimiter.

                                                    So s means substitute

                                                    The first and 2nd # contain a regular expression; .* any character
                                                    (expect a newline), zero or more times followed by a forward slash.

                                                    Between the 2nd and 3rd is the replacement pattern, in this case
                                                    nothing.

                                                    So it simply strips the /etc/ off of the path.
                                                    see perlretut

                                                    I think most people would advise against using # as a delimiter and
                                                    use slashes instead, but as in this case the regex needs a slash the
                                                    writer has opted to use # to de-mark what is the regex and what is
                                                    the replacement.

                                                    HTH.
                                                    Dp.



                                                    On 24 Jan 2006 at 21:11, balan.ranganathan@... wrote:

                                                    > Hi
                                                    >
                                                    > I am not able to understand below regular expression.
                                                    >
                                                    >
                                                    >
                                                    > $nextname =~ s#.*/##; # remove part before last slash
                                                    >
                                                    >
                                                    > Can you please tell me how does the above expression works?
                                                    >
                                                    >
                                                    > Please have a look at the below mentioned example.
                                                    >
                                                    > #!/usr/bin/perl
                                                    >
                                                    > while ($nextname = </etc/host*>) {
                                                    > $nextname =~ s#.*/##; # remove part before last slash
                                                    > print "one of the files is $nextname\n";
                                                    > }
                                                    >
                                                    >
                                                    > The output is :
                                                    >
                                                    >
                                                    >
                                                    > one of the files is host.conf
                                                    >
                                                    > one of the files is hosts
                                                    >
                                                    > one of the files is hosts.allow
                                                    >
                                                    > one of the files is hosts.canna
                                                    >
                                                    > one of the files is hosts.deny
                                                    >
                                                    >
                                                    >
                                                    > The operation is stripping the file name from the path (for ex:
                                                    > /etc/hosts.conf).
                                                    >
                                                    >
                                                    >
                                                    > Thanks
                                                    >
                                                    >
                                                    >
                                                    > Best regards
                                                    >
                                                    > Bala
                                                    >
                                                    >
                                                    >
                                                    >
                                                    >
                                                    > [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
                                                    >
                                                    >
                                                    >
                                                    >
                                                    >
                                                    >
                                                    >
                                                    >
                                                  • Paul Archer
                                                    ... First, keep in mind that the character after the s in a substitute becomes the delimiter. So the # is the delimiter here instead of the more customary /.
                                                    Message 25 of 25 , Jan 24, 2006
                                                    • 0 Attachment
                                                      9:11pm, balan.ranganathan@... wrote:

                                                      > Hi
                                                      >
                                                      > I am not able to understand below regular expression.
                                                      >
                                                      >
                                                      >
                                                      > $nextname =~ s#.*/##; # remove part before last slash
                                                      >
                                                      >
                                                      First, keep in mind that the character after the 's' in a substitute becomes
                                                      the delimiter. So the # is the delimiter here instead of the more customary
                                                      /. That makes sense, since we're searching for a slash, and would have to
                                                      escape it otherwise: s/.*\/// (not nearly as easy to read!).

                                                      The first part is what we're looking for: .*/
                                                      That's a dot (any one character), plus a star (zero or more of the preceding
                                                      character), and a literal slash. That matches anything up to and including
                                                      the last slash in the string.
                                                      The second part is what we replace it with. In this case, it's nothing at
                                                      all.


                                                      >
                                                      > #!/usr/bin/perl
                                                      >
                                                      > while ($nextname = </etc/host*>) {

                                                      # When trying to figure out regular expressions, it usually helps to see the
                                                      # data before the substitute:
                                                      print "\$nextname is $nextname\n";

                                                      > $nextname =~ s#.*/##; # remove part before last slash
                                                      > print "one of the files is $nextname\n";
                                                      > }
                                                      >
                                                      >
                                                      > The output is :
                                                      >
                                                      >
                                                      >
                                                      > one of the files is host.conf
                                                      >
                                                      > one of the files is hosts
                                                      >
                                                      > one of the files is hosts.allow
                                                      >
                                                      > one of the files is hosts.canna
                                                      >
                                                      > one of the files is hosts.deny
                                                      >
                                                      >
                                                      >
                                                      > The operation is stripping the file name from the path (for ex:
                                                      > /etc/hosts.conf).
                                                      >
                                                      >
                                                      >
                                                      > Thanks
                                                      >
                                                      >
                                                      >
                                                      > Best regards
                                                      >
                                                      > Bala
                                                      >
                                                      >
                                                      >
                                                      >
                                                      >
                                                      > [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
                                                      >
                                                      >
                                                      >
                                                      >
                                                      >
                                                      >
                                                      >



                                                      ------------------------------------------------
                                                      Whenever you feel anger, you should say,
                                                      "May I be free of this anger!"
                                                      This rarely works, but talking to yourself in
                                                      public will encourage others to leave you alone.
                                                      --------------David M. Bader--------------------
                                                    Your message has been successfully submitted and would be delivered to recipients shortly.