Usage of defaultvariable @_ with shift

2005-07-18 Thread Mathias Pasquay
Dear list, i'am just wondering about the behaviour of shift and the defaultvariable @_ . I use the following code:: while () { # each line of RULEFILE is stored in $_ chomp;# delete \n from $_ split /;/; #

Re: Usage of defaultvariable @_ with shift

2005-07-18 Thread Xavier Noria
On Jul 18, 2005, at 10:57, Mathias Pasquay wrote: Now i change the line "my $test = shift @_" into "my $test = shift". This should work because shift should use @_ by default. But in this case $test is empty an the second print command prints still the whole @_. Have a look at perldoc -f sh

Re: Usage of defaultvariable @_ with shift

2005-07-18 Thread John W. Krahn
Mathias Pasquay wrote: > Dear list, Hello, > i'am just wondering about the behaviour of shift and the defaultvariable @_ . > > I use the following code:: > > while () { # each line of RULEFILE is stored in > $_ > chomp;# delete \n from $_ >