Good Morning Esteemed Monks!
My question has to do with auto increments and I think I am missing something very simple as when I add rows to my file the ID should go up by 1 when each new entry is added correct? Please refer to my code below and point me in the right direction as to what I am missing. Thanks in advance!
my $id = 1; my $output="data.txt"; open(DAT,">>$output") || die("Cannot Open File"); print DAT ($id++); print DAT (":"); print DAT ($name); print DAT (":"); print DAT ($number); print DAT (":"); print DAT ($address); print DAT (":"); print DAT ($phone); print DAT (":"); print DAT ($email); print DAT ("\n"); close (DAT);
In reply to auto increment by PilotinControl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |