Thank you very much for correcting me... As I explain in my comments, I'm not really a programmer, and, well, I'm begining with perl.
You are right! I have downloaded the script and found a difference with the one I use... I don't declare "my $size=1024". If you do this, the script will work. I think I posted the code before correcting the bug :-(
With $no_partes, what the script do is read parts of $MAX_SIZE_PART. When $no_partes is less than $MAX_SIZE_PART
it gets out with the rest of the file. Ej: 120 mgs into 50, 50 and 20.
Thank you for your advice about @ARGV... I'm not very clear about the use of the arguments by now. I have to learn a lot yet ;-)
And it's true, I should better read and write a chunk at a time... In fact, my hard disk seems like if it's going to explode each time I run the script.
I know that the first thing to do when you want to program in Perl is look at the CPAN, but I know that the best way for learn programing is make programs... And I was sooo proud about this script! Well, I'll try to be more careful with the code before post it. Thank you.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.