开发者

perl escape character in function calls

开发者 https://www.devze.com 2023-04-09 14:54 出处:网络
When I use a perl statement like, $workbook = Spreadsheet::ParseExcel::Workbook->Parse(\\($mechanize->content))

When I use a perl statement like,

$workbook = Spreadsheet::ParseExcel::Workbook->Parse(\($mechanize->content))

where 开发者_运维百科$mechanize is a WWW::Mechanize object, why do we escape the $mechanize->content?


It's not escaping, it's referencing. Read more examples here:

As a special case, \(@foo) returns a list of references to the contents of @foo , not a reference to @foo itself. Likewise for %foo , except that the key references are to copies (since the keys are just strings rather than full-fledged scalars).

0

精彩评论

暂无评论...
验证码 换一张
取 消