Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: List of worksheets in an Excel workbook

by bmann (Priest)
on Jun 08, 2005 at 17:32 UTC ( [id://464763]=note: print w/replies, xml ) Need Help??


in reply to Re^2: List of worksheets in an Excel workbook
in thread List of worksheets in an Excel workbook

davidrw answered what $/ is, the input record separator. I just used it to print the newline. I most likely wouldn't want the newline if I were assigning the sheet name to a variable.

Since $/ defaults to "\n", I use it in one-liners so I don't have to think about shell quoting issues (I use both Win32's cmd and bash regularly), and it looks like it's crept into my test scripts too. I would not use it as a newline in production code.

About the warning, my $current_sheet = $sheet->Name, $/ is parsed as

((my $current_sheet = $sheet->Name), $/);
The comma operator in scalar context evaluates the left side, throws it away and returns the right side, a bare "$/". Look in perldiag for "Useless use of %s in void context".

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-19 12:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found