Consider following array varaible :-
@foo = ("one", "two", "three");
When we say :-
print @foo;
We get following output
one two three
i.e. :- All values sperated by a space.
Now we will assign :-
$" = " ++++ ";
print foo;
Now the output will be :
one ++++ two ++++ three
Which means $" acts as a delimiter for array.
NOTE :-
Same behavior is seen when :-
$bar = "@foo"
@foo = ("one", "two", "three");
When we say :-
print @foo;
We get following output
one two three
i.e. :- All values sperated by a space.
Now we will assign :-
$" = " ++++ ";
print foo;
Now the output will be :
one ++++ two ++++ three
Which means $" acts as a delimiter for array.
NOTE :-
Same behavior is seen when :-
$bar = "@foo"
No comments:
Post a Comment