While I was working with delete function. I got a doubt that, how delete function is able to identify the difference between normal scalar and array scalar.
eg.
delete $arr[0]; #it works delete $scalar; #it throws error delete $hash{$key}; #it works
I want to know whether we can write subroutines which can detect the scalar and array element and how? if any one has an idea on this, please let me know.
In reply to argument to delete function by karthikasasanka
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |