Hi Thanks for the reply. I managed to write and execute my perl program.

Now my next question is , I am following the learning perl Llama book.

There in Chapter 1, there is a function used whose output is

perldoc -u -f atan2

=over 8

=item atan2 Y,X

Returns the arctangent of Y/X in the range -PI to PI.

For the tangent operation, you may use the C<Math::Trig::tan>
function, or use the familiar relation:

    sub tan { sin($_[0]) / cos($_[0])  }

=back


for this script, they said there should be a different output for this
program as opposed to the above output

#!/usr/bin/perl
@lines = 'perldoc -u -f atan2';
foreach (@lines){
    s/\w<([^>]+)>/\U$1/g;
    print;
}

but all i get is

perldoc -u -f atan2

as the output.

Am i missing something.

thanks for looking in





On 2/10/06, Brian Volk <[EMAIL PROTECTED]> wrote:
>
>
>
> > -----Original Message-----
> > From: Avinash Sridhar [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, February 09, 2006 1:41 PM
> > To: beginners@perl.org
> > Subject: A very basic question
> >
> > Hello All,
> >
> >    I just joined this forum today and I dont know whether this
> particular
> > question has been posted before. If it is please do let me know where i
> > can
> > get the answer from.
> >
> >    I am using a Windows XP Professional box. Want to learn perl, how do
> i
> > go
> > about downloading the perl interpreter. I was told to use Active perl. I
> > downloaded it and having a tough time figuring out how I can work with
> it.
> >
> > Any help would be appreciated.
> >
> > Thanks
> > Avinash
>
> Avinash,
>
> After you download and install ActiveState Perl... you are all set. You
> might want to install Perl Edit which is a nice perl text editor; you can
> download that here http://www.indigostar.com/perledit.html
>
> Open the text editor and type:
> -----------------
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> print "Hello World!\n";
> -----------------
> 1.) name the file hello_world.plx
> 2.) open a command prompt and go to directory where you saved the file
> 3.) type perl hello_world.plx
>
> You should see:
>
> C:\brian\perl>perl hello_world.plx
> Hello World!
>
> C:\brian\perl>
>
>
> Hope this helps!
>
> Brian Volk
>
>
>

Reply via email to