in reply to can't use string as an array ref....

It is possible, even highly likely, that $ARGS{edit_item} is a scalar containing the string "1".

The complaint would be that you are attempting to dereference an array by sticking @{...} around the scalar item.

You can confirm whether this is the case by commenting out the (potentially) offending code, and replacing it with:

{ use Data::Dumper; $m->out( '<pre>' . Dumper( \%ARGS ) . '</pre>' ); }