Bonjour, moines.
I want to assign strings with arbitrary characters to a variable.
First I tried double quotes: my $tweet = "RT @peteyorn: @Starbucks Thanks for putting the Break Up album for sale in your stores. \\ It's a great album! Nice work!"
That interpolates @peteyorn as an array.
I wisened up and tried single quotes. But the assignment doesn't terminate; Perl runs through the ending ' on later lines. Next I tried q{ TEXT }:
my $tweet = q{RT @peteyorn: @Starbucks Thanks for putting the Break Up album for sale in your stores. \\ It's a great album! Nice work!}
That prints \\ as \.
Is there a way to really, truly, literally, verbatim assign what's enclosed, no questions asked and no thoughts thunk on perl's part?
Salutations distinguées.
taureau
de plus: my $tweet is just a particularly pesky example so I am coding against it. In the final application I will be piping a .csv through @ARGV, so will this problem just go away? (Some of the proposed solutions make me think so.)
In reply to verbatim, non-interpolated assignment by toro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |