@vaibak = <FILE>;
print BAK "@complete @varibak";
when i try to run this i get an error it says i need to write it this ways
print BAK "@complete \@varibak";
whats the difference!!!!!!!!!!!!
print BAK "@complete @varibak";
You are telling PERL to print the arrays and combine them within a set of quotes which is a logic error. This is probably what you want
@final = (@complete, @varibak);
print BAK "@final";
print BAK "@complete \@varibak";
This \ is escaping the @ which negates the array context making it legal
The problem is that you mispelled the variable in the print statement ('vaibak' vs 'varibak'). Perl doesn't recognize the variable but since it's inside a string it isn't a fatal error (if you're using strict), a warning is thrown because maybe you were just trying to print a literal '@'.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.