in reply to auto increment
my $file = "data.txt"; open FILE, "<$file"; @lines = <FILE>; close FILE; $id = @lines; $id++; open DAT, ">>$file"; print DAT ("${id}:${name}:${number}:${address}:${phone}:${email}\n"); close DAT;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: auto increment
by choroba (Cardinal) on May 05, 2015 at 15:15 UTC | |
by edimusrex (Monk) on May 05, 2015 at 15:35 UTC |