in reply to argument to delete function
I want to know whether we can write subroutines which can detect the scalar and array element and how?
No, all a sub receives is scalars.
delete is handled specially by the parser.
is compiled into something likedelete($a[0]);
delete(\@a, 0);
What are you actually trying to do?
|
|---|