On Monday 12 Jul 2010 11:07:49 newsense wrote:
> This is what i currently have but am not sure how i can use printf
> here instead of print so i can get some nice columns.
> 
> #!/usr/bin/perl
> use warnings;
> use strict;
> 
> open my $list, "<", "proxylist.txt" or die $!;
> open my $outfile, ">", "test.txt" or die $!;
> 
> while (<$list>) {
> print $outfile (join(" ", "socks5",  split /:/ ));
> }

It depends how many columns you have and how wide each one of them should be. 
See the printf / sprintf tutorial at:

http://perl-begin.org/tutorials/perl-for-newbies/part4/#page--sprintf--DIR

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Best Introductory Programming Language - http://shlom.in/intro-lang

God considered inflicting XSLT as the tenth plague of Egypt, but then
decided against it because he thought it would be too evil.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to