Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^5: Trying to Copy Live Http Replay

by spazm (Monk)
on Mar 12, 2010 at 20:53 UTC ( #828353=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Trying to Copy Live Http Replay
in thread Trying to Copy Live Http Replay

using "" and qq{} should be nearly equivalent(1). In both cases you need to be careful to not include additional whitespace.

Here are four equivalent declarations using "" and qq{}.

#/usr/bin/perl use strict; use warnings; use Test::More tests =>4 ; my $a1 = qq{a\r\nb\r\nc\r\n}; my $a2 = qq{a\r b\r c\r }; my $b1 = "a\r\nb\r\nc\r\n"; my $b2 = "a\r b\r c\r\n"; is( $a1, $a2, "a1 and a2 are the same"); is( $b1, $b2, "b1 and b2 are the same"); is( $a1, $b1, "a1 and b1 are the same"); is( $a2, $b2, "a2 and b2 are the same"); __END__ 1..4 ok 1 - a1 and a2 are the same ok 2 - b1 and b2 are the same ok 3 - a1 and b1 are the same ok 4 - a2 and b2 are the same

1 -- except for the semantics used for escaping, qq will escape double-quotes in the string.


Comment on Re^5: Trying to Copy Live Http Replay
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://828353]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (16)
As of 2015-07-31 14:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls