Google Groups Home
Help | Sign in
Message from discussion write 10 files
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Ela  
View profile
 More options May 16, 5:45 am
Newsgroups: comp.lang.perl.misc
From: "Ela" <e...@yantai.org>
Date: Fri, 16 May 2008 17:45:21 +0800
Local: Fri, May 16 2008 5:45 am
Subject: write 10 files

The following codes are not accepted by Perl and even string concatenation
doesn't work. Any suggestions?

#!/usr/bin/perl

$infile = $ARGV[0];
foreach $k (0..10) {
    $outfile = $infile . $k;
    open (OFP$k, ">$outfile");

}

$i = $size/10000;
print OFP$i "something"; #0-10k, 10-20k, .... 90-100k...

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google