[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] push vs. unshift



>I have seen scripts that use push(@INC,"/usr/www/cgi-bin/requires"); in
>lieu of unshift(@INC, "/usr/www/cgi-bin/requires"); apparently for the same
>use.
>
>What would be the difference?

unshift puts the path at the front of the list, push puts it
at the back. When you 'use' or 'require' a file, it looks for
it in each path on the list, front to back, until it finds that
file.

Glen