Hi I am really unsure how I can add some features for making html easier to create with a perl script that basically take the input from the user and transform into either html or css - this is the features I am unsure how to add. The part of general adding text to a file I just got to work, there were a lot of debugging in doing that.
My basic script is following:
-----------------start of code------------------------------
#!/usr/bin/env perl -w#<br/>
print "Press w to write.\n Press q to quit\n";#<br/>
while (my $userinp = <STDIN>) {#<br/>
chomp $userinp;#<br/>
open(FILE, '>>', 'myfile.txt');#<br/>
while ($userinp ne "q") {#<br/>
my $usi = <STDIN>;#<br/>
chomp $usi;#<br/>
print FILE $usi;#<br/>
print "Success - if this statecomes it should
mean succes.\n";#<br/>
if ($usi eq "q") {#<br/>
close FILE;#<br/>
die("You have decided to kill this program\n");#<br/>
}#<br/>
}#<br/>
}#<br/>
-----------------------------end of code--------------------
the new features should ofcourse be added, and I think a redesign would be needed - it would be better to make some subroutines to do the actual work and then just call them in the program, but I am not making a change to this before I have some idea about what I should do about the html and css... This I think would be a nice tool for webmasters.
Greetings Tobox
PS - please just ignore my html tags, they really wont go... That is ofcourse on preview but I am not expecting this to change when I post....
Well they atleast are not in the way of running the program
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.