Thanks tye. I think I'm getting confused...must be age senility. I appreciate your patience and attempt to help me and appologize in advance for not letting this drop...but I am confused.
I thought the author of the book was trying to show me a way to *not* create a real file (i.e., to *not* create the &SDTOUT file)...only create the log file...but still effectively re-direct SDTOUT without using the select($logfile) which only works as long as the programmer doesn't do an explicit print to SDTOUT (e.g., print SDTOUT "Hello, world\n" which would would not print to the log file, but rather would print to SDTOUT).
But if the open creates &SDTOUT then the programmer has to invest in additional code to delete that file...which seems like that would defeat the intentions...IMHO.
But in addition, based upon what you wrote, I'm still confused about why the 2-arguent version of open *without* the space between the direction and the & would *not* create the file, but with the space it does. Why does the lack of the space prevent the creation of the file?
I think I'm also confused about the purpose of the anpersand (i.e., the &)...I thought it was a special symbol or prefix...that wouldn't get interpreted as a part of the filename, but rather was necessary to *prevent* the interpretation of SDTOUT as a file name. So...since I obviously don't understand the true nature of the & symble, can you enlighten me as to what *is* it's purpose.
In reply to Re^4: "Pro Perl's" Redirecting Filehandles - Unexpected Result (why)
by DarkLord1
in thread "Pro Perl's" Redirecting Filehandles - Unexpected Result
by DarkLord1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |