next up previous contents
Next: Variables Up: Example: Double-Quoted Strings Previous: Example: Double-Quoted Strings

Example: Back-Quoted Strings

It might be argued that back-quoted strings are not really a data type. That's because Perl uses back-quoted strings to execute system commands. When Perl sees a back-quoted string, it passes the contents to Windows, UNIX, or whatever operating system you are using.

Let's see how to use the back-quoted string to display a directory listing of all text files in the perl5 directory:

print `dir *.txt`;