Hi,

I'm working on a project which uses another guy's code and he had all warnings off so I've been trying to clean up his code in order to get a clean compile. I've managed to clean up all but two lines of code, which are being used in a peculiar way.

The code is as follows:

$var_cellsplit=split( //. $var_cellname ); $var_cdrcellsplit=split( //. $var_cdrcellname );
Now what he's trying to do is to get the length of $var_cellname and $var_cdrcellname by splitting into elements and counting the elements. It works, but it returns the error shown above.

Is there a way to make this cleaner? I'm assuming he went this way for a reason instead of using length().

Thanks,
Alatar

*EDIT* Roy and Dave, thanks for the explanation. The . was simply a typo as I'm accessing the web from a different PC than where I have the Code. I'm pretty sure now that he was doing this because he wasn't aware of the length() function.


In reply to Use of implicit split to @_ is deprecated by Alatar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.