Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: string increment

by reasonablekeith (Deacon)
on Sep 13, 2005 at 10:42 UTC ( [id://491545]=note: print w/replies, xml ) Need Help??


in reply to Re: string increment
in thread string increment

and here's a different style solution for you.

Note the use of use strict forcing me to decalre my variables.

#!/perl -w use strict; print"key in your string :"; chomp( my $string_name=<STDIN>); my $low_string = "a"x length($string_name); my $count = 0; while($low_string ne $string_name) { $low_string++; $count++; } print"$string_name is the $count th value starting from $low_string\n" +;
---
my name's not Keith, and I'm not reasonable.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://491545]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found