Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: PERL csv files to Excel

by kcott (Archbishop)
on Mar 25, 2023 at 07:52 UTC ( [id://11151188]=note: print w/replies, xml ) Need Help??


in reply to Re: PERL csv files to Excel
in thread PERL csv files to Excel

"What's unique about this Perl script is that it does not rely on any Perl modules ..."

The first three lines of code:

use 5.004; use strict; use warnings;

BUT

$ corelist warnings Data for 2022-05-27 warnings was first released with perl v5.6.0

So, clearly this will not work with Perl 5.004. If you're going to assert a minimum version, ensure you have tested with that version.

On an unrelated note, please stop messing with colours. I'm pretty sure that you've been pointed to "Writeup Formatting Tips" in the past; if not, or if you didn't read it, please do read it, paying particular attention to the Don't get carried away section (near the end). What it says there about <font> tags applies equally to bgcolor attributes. Putting your <code> content inside a <table> with BGCOLOR=66CCDD is not a clever way to exploit what perhaps you considered a loophole.

If you want to see fancy colours when viewing code, go to your Display Settings and set up appropriate CSS. Don't force your preferences on others.

— Ken

Replies are listed 'Best First'.
Re^3: PERL csv files to Excel
by harangzsolt33 (Chaplain) on Mar 25, 2023 at 14:59 UTC
    Okay, I removed the colors.

    Yes, I know. To make it work, I added a dummy file into the lib directory of perl called warnings.pm and it has a number 1 in it. So, that way I can leave the warnings in it yet will work on old Perl! Yes, maybe I should clarify that. Right? But I figured that the number of people who would need that advice is really small. I could probably count on one hand how many will run this code using an old perl interpreter. And of course, when they try it, it's going to say that there is no such thing us warnings.pm. Now, at this point, I hope these guys will use their brilliant mind to either remove the first line where warnings is mentioned or they'll add a fake warnings.pm file like I have.

      "Okay, I removed the colors."

      But you have failed to add an Update: indicating this change. Please reread "How do I change/delete my post?" which will explain that to you; in particular, note the It is uncool to update a node in a way that renders replies confusing or meaningless section. I recall we had this discussion last month: "Re^2: Error handling in a module".

      "To make it work, I added a dummy file into the lib directory of perl called warnings.pm ..."

      So, your code relies on this addition of a "dummy" pragmatic module; however, your post still retains the statement "... it does not rely on any Perl modules ..." which you should correct.

      I suggest you look at $^W which was available in Perl 5.004 (see https://metacpan.org/release/CHIPS/perl5.004/view/pod/perlvar.pod#$^W).

      If you are going to present code to run on ancient versions of Perl — 5.004 was released 26 years ago; see perlhist — please state that clearly near the start of your post. As it stands, you have to scroll through an entire screenful of comments to find 'use 5.004;'.

      Please reread "Writeup Formatting Tips"; this time paying attention to the Use <readmore> tags in long posts section. The code you posted takes up 14 screenfuls on my 27" monitor; probably many more for those with smaller devices. Please be considerate of your fellow monks.

      — Ken

      A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

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

    No recent polls found