Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Replacing a text field in a spreadsheet

by Nitrox (Chaplain)
on Nov 21, 2002 at 16:06 UTC ( #214804=note: print w/replies, xml ) Need Help??


in reply to Replacing a text field in a spreadsheet

You could always reffer to the items you need as:
$line[0] $line[6]
etc...

-Nitrox

Replies are listed 'Best First'.
Re: Re: Replacing a text field in a spreadsheet
by jonnyfolk (Vicar) on Nov 21, 2002 at 16:55 UTC
    I thought I was getting somewhere with this:
    ... open (IN, "$data") || die "Couldn't get $data page"; my @all = <IN>; close (IN); open (IN2, ">$data.tmp") || die "Couldn't open temporary file"; foreach my $line (@all) { my ($one,$two,$three,$four,$five,$six,$seven) = split "\t",$line; if ($three eq $checkthree) { ($one,$two,$three,$four,$five,$six,$seven) = @line; last; } } rename("$data.tmp", "$data") || die "Couldn't rename file"; print "okay";
    As it went through and printed "okay".
    Unfortunately it wiped the file so obviously my definition of "okay" is different to perl's :-)
    What to do?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2023-06-06 09:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (26 votes). Check out past polls.

    Notices?