I would like to be able to use this same syntax when the text to be processed is in the form of a string rather than a file. Can I associate a string with a virtual filehandle? Ideally the syntax would be something like:open (MYFILE, 'mypath'); while (<MYFILE>){ #my code here }
#magically turn $myString into a filehandle. while (<MYSTRING>){ #my code here }
In reply to Can Perl Turn A String Into A Virtual File? by sierrathedog04
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |