Ivanov Dmitry <[email protected]> writes: Hi,
> Code:
>
> #+BABEL: :cache yes :tangle yes :noweb yes
>
> #+NAME: top_block
> #+begin_src perl :tangle "test.pl" :noweb tangle
From (info "(org) padline"):
> 14.8.2.10 ‘:padline’
> ....................
>
> Control in insertion of padding lines around code block bodies in
> tangled code files. The default value is ‘yes’ which results in
> insertion of newlines before and after each tangled code block. The
> following arguments are accepted.
>
> • ‘yes’ Insert newlines before and after each code block body in
> tangled code files.
> • ‘no’ Do not insert any newline padding in tangled output.
You can use the following block declaration:
#+begin_src perl :tangle "test.pl" :noweb tangle :padline no
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> open(my $fh, "<", "test.txt")
> or die "cannot open < file name: $!";
> <<output-all>>
> close($fh);
> #+end_src
>
> #+NAME: output-all
> #+begin_src perl
> while (my $line = <$fh>) {
> print $line;
> }
> #+end_src
>
> Outputs a perl file, where the 1-st line is blank. What should I do to remove
> it?
--
Daimrod/Greg
signature.asc
Description: PGP signature
