in reply to argument to delete function

how delete function is able to identify the difference between normal scalar and array scalar.

perl magick :)

I want to know whether we can write subroutines which can detect the scalar and array element and how?

The easy way might involve one of the B modules (if its possible), and the hard way would involve hacking perl

if any one has an idea on this, please let me know.

Why do you want this? Maybe you want to tie an array or a hash instead?