Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: My program it doesn't work could you tell me my mistakes?

by virtualsue (Vicar)
on Nov 10, 2001 at 19:44 UTC ( #124558=note: print w/replies, xml ) Need Help??

in reply to My program it doesn't work could you tell me my mistakes?

Here's a simple, "idiomatic" alternative to your code which runs with warnings and strict syntax checking enabled.. monkeygirl has already pointed out the problems with your original version.
#!/usr/bin/perl -w use strict; print "What is your name?\n"; chomp (my $name = <stdin>); print "What is your age?\n"; chomp (my $age = <stdin>); print "You are $name and your age is $age years old.\n";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://124558]
[LanX]: sorry, i didn't break math yet, but it's top priority on my todo list
[choroba]: does your list start with number 5?
[LanX]: -i
LanX it's an imaginary list ...
LanX ... reflecting root problems
choroba uses real lists so he can easily insert as many items in between as needed
LanX questions the integerity of this approach. ..
LanX doesn't sound natural

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (13)
As of 2018-03-20 10:24 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (249 votes). Check out past polls.