You,re right! But I had some hours, so my solution is :

---------------------------------
#!/usr/bin/perl

$file = "$ARGV[0]";
open(HANDLE, '<' , "$file");
@lines=<HANDLE>;
foreach $line (@lines)
{
@test=split("#include",$line);
print $test[0] ;
@plik=split("#include <",$line);
@plik1=split(">",$plik[1]);
open(HAND, '<' , "$plik1[0]");
@nagl=<HAND>;
foreach $linia (@nagl){
print $linia;
}
close(HAND);
}
close(HANDLE);
---------------------------
But I suppose there is faster method to do this.
So The Question Is :  HOW?

Written by  Mariusz Wyrozebski
            [EMAIL PROTECTED]
            [EMAIL PROTECTED]
            www.mat.uni.torun.pl/~moon

On Mon, 1 Jul 2002, Nigel Peck wrote:

> Could you please make it clear what you want to do (unless I'm missing
> the point) when you say you want to change the #include lines to their
> entry.
>
> Do you meant you want to put the data from the file in instead of the
> #include line?
>
> >>> Mariusz Wyrozebski <[EMAIL PROTECTED]> 07/01/02 03:29pm >>>
> I'm very curious about little script, that works as "prep" in c/c++.
>
> The problem is:
> We have one file, which contains lines like
> -----------------------------
> #include <file1.h>
> #include <file2.h>
> ....
> blah,blah,blah
> -----------------------------
> in blah you have nomal c program.
>
> Everything I want is to change lines
> #include <xxx.h>
> to their entry.
>
> Please help!
> Thanks in advance!
>
>
> Written by  Mariusz Wyrozebski
>             [EMAIL PROTECTED]
>             [EMAIL PROTECTED]
>             www.mat.uni.torun.pl/~moon
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ITM Business Solutions
> Unit 4
> Nine Trees Trading Estate
> Morthen Road
> Rotherham
> S66 9JG
>
> Reception
> Tel: 01709 703288
> Fax: 01709 701549
>
> Help Desk
> Tel:01709 530424
> Fax: 01709 702159
>
> CONFIDENTIALITY NOTICE: This message is intended only for the use of
> the individual or entity to which it is addressed, and may contain
> information that is privileged, confidential and exempt from disclosure
> under applicable law.
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to