Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Problem with creating Files

by poj (Abbot)
on Jul 25, 2014 at 10:18 UTC ( [id://1095025]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Problem with creating Files
in thread Problem with creating Files

I'm not sure I fully understand your problem but try this
#!perl use strict; # test for ('file1LAY.html','file1DFT.html','file2DFT.html'){ open OUT,'>',$_; createButtons(undef,$_); } sub createButtons{ my ($outfile,$filename) = @_; my %file=(); if ($filename =~ m/(.+)(?:LAY|DFT)\.html/){ for my $s ('LAY','DFT'){ $file{$s} = './'.$1.$s.'.html'; $file{$s} = '#' unless (-e $file{$s}); } } print qq! <a href="$file{'LAY'}" class="button_lay">Layout</a> <a href="$file{'DFT'}" class="button_dft">DfT</a>\n </div>\n!; }
poj

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-25 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found