Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

RE: Perl/Tk Chatterbox Client

by ZZamboni (Curate)
on Jul 13, 2000 at 01:43 UTC ( #22284=note: print w/replies, xml ) Need Help??


in reply to Perl/Tk Chatterbox Client

If you cut-and-paste from this page, you can use the following to remove the continuation "+" signs and reconstruct the file correctly:
perl -ne 'chomp; if (/^\+(.*)$/) { $last.=$1 } \ else { print "$last\n"; $last=$_ } \ END { print "$last\n" }' origfile.pl > destfile.pl

--ZZamboni

Replies are listed 'Best First'.
RE: RE: Perl/Tk Chatterbox Client
by tye (Sage) on Jul 25, 2000 at 20:32 UTC

    This is easier to type:

    perl -pe 'chomp;s/^\+//||s/^/\n/;END{print"\n"}' # Unix perl -pe "chomp;s/^\+//||s/^/\n/;END{print qq.\n.}" # Win32

    And you can drop the END{...} part if you just append an extra blank line to the input or don't mind the missing final newline on the output.

Re: RE: Perl/Tk Chatterbox Client
by Chady (Priest) on Jan 22, 2001 at 01:42 UTC
    isn't it easier to click on the "d/l code" to download the code????
    Chady | http://chady.net/
      Those comments were written waaaaaay before the "d/l code" feature existed... :-)

      --ZZamboni, aka Duke Dong

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://22284]
help
Chatterbox?
[erix]: but elephant /are/ big
[Discipulus]: Lady_Aleena micro management of code, micro optimization is a pain, you'll brake working things
[Discipulus]: erix you are right but buy a bigger monitor for me then
[Lady_Aleena]: Well, it is done with little pain for now.

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-05-27 20:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?