James Edward Gray II wrote:
> On Mar 12, 2004, at 1:39 PM, Meneses, Alden wrote:
> 
>> Suppose I have machines that are ACMExxxx
>> 
>> I want to go from ACME0001 to ACME9999
> 
> How's this?
        If you have it in a variable then you only need ++ to get to the next item:
        my $MyMachines = 'ACME0001';

        # to get the next item
        $MyMachines++;

        Seems to simple, but ran a test and it works just like that.

Wag ;)
> 
> foreach (1..9999) {
>       printf "ACME%4d\n", $_;
> }
> 
> James



      Any questions and/or problems, please let me know.

      Thanks.

Wags ;)
Int: 9-8-002-2224
Ext: 408-323-4225x2224



**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to