Line by lineHi, I have a file extremely large in size and length. I want to read the
file line by line and worry about matching up each line and running that
line through a subroutine instead of opening the entire file (which would
take a while).
So how do I open a file up and process each line individually?
On Dec 17, 2003, at 7:28 PM, PerlDiscuss - Perl Newsgroups and mailing
lists wrote:
> Hi, I have a file extremely large in size and length. I want to read
> the
> file line by line and worry about matching up each line and running
> that
> line through a subroutine i...
Line-To-LineI have one string like this:
Hello, I am a shopkeeper (linefeed)
Thus, I like to say... (linefeed)
Good Morning (linefeed)
How can I put this string line-to-line recording it into a file?
How about something like this....
long ln_pos,ln_filenum,ln_start_point
string tmp_part
ln_start_point = 1
//fileopen
ln_filenum = FileOpen("c:\export.txt",LineMode!,Write!,LockWrite!,Replace!)
ln_pos = Pos(ls_your_string,'~n',1) //~r~n if CR LF
for ln_pos > 0
tmp_part = Mid(ls_your_string,ln_start_point,ln_pos)
FileWrite(filenum,tmp_part)
ln_start_...
Lines, what lines?Given all the talk about high voter turnout, I got to the polls about
15 minutes after they opened at 7:15am. This was about the same time I
went in 2006. The line today was about the same as then. It took about
30 minutes to vote for McCain and go. By the time I left, the line was
about 30% shorter. Weather was good and parking was adequate.
Are the reports of long waits just media hype?
Don Abel wrote:
> Are the reports of long waits just media hype?
Maybe you ought to read Kirt's post in the Mark 8:10 blabla thread.
Don Abel wrote:
> Are the reports of long waits...
How to get the script line number on demandHow does one print the line number of the script as it executes.
Something like what the PS4 shell var does if you set it to:
PS4='$LINENO'
Then when running a shell script with -x flag you see script line
numbers as it runs.
I'd like to stick these into code at times to help debug
print "mydbg $VarThatHoldsCurrentScriptLineNo\n";
Harry Putnam wrote:
>
> How does one print the line number of the script as it executes.
>
> Something like what the PS4 shell var does if you set it to:
>
> PS4='$LINENO'
> Then when run...
superreview denied: [Bug 253405] Warning for document.all doesn't list source file or line number : [Attachment 155287] get the source file and line numberBrendan Eich <brendan@mozilla.org> has denied Boris Zbarsky
<bzbarsky@mit.edu>'s request for superreview:
Bug 253405: Warning for document.all doesn't list source file or line number
http://bugzilla.mozilla.org/show_bug.cgi?id=253405
Attachment 155287: get the source file and line number
http://bugzilla.mozilla.org/attachment.cgi?id=155287&action=edit
------- Additional Comments from Brendan Eich <brendan@mozilla.org>
>-static void
>-PrintDocumentAllWarningOnConsole()
>+static nsresult
>+PrintDocumentAllWarningOnConsole(JSContext *cx)
&g...
superreview requested: [Bug 253405] Warning for document.all doesn't list source file or line number : [Attachment 155287] get the source file and line numbertimeless@myrealbox.com (working) <timeless@bemail.org> has asked Boris Zbarsky
<bzbarsky@mit.edu> for superreview:
Bug 253405: Warning for document.all doesn't list source file or line number
http://bugzilla.mozilla.org/show_bug.cgi?id=253405
Attachment 155287: get the source file and line number
http://bugzilla.mozilla.org/attachment.cgi?id=155287&action=edit
...
superreview requested: [Bug 253405] Warning for document.all doesn't list source file or line number : [Attachment 155287] get the source file and line number #2Boris Zbarsky <bzbarsky@mit.edu> has asked Brendan Eich <brendan@mozilla.org>
for superreview:
Bug 253405: Warning for document.all doesn't list source file or line number
http://bugzilla.mozilla.org/show_bug.cgi?id=253405
Attachment 155287: get the source file and line number
http://bugzilla.mozilla.org/attachment.cgi?id=155287&action=edit
------- Additional Comments from Boris Zbarsky <bzbarsky@mit.edu>
Brendan would be a much more reasonable sr for this than I (especially given
that note on reviewers.html).
...
RE: How to get 1st line, last line and no of lines in a file
> -----Original Message-----
> From: Madhu Reddy [mailto:saitech74@yahoo.com]
> Sent: Wednesday, February 19, 2003 1:25 PM
> To: beginners@perl.org
> Subject: How to get 1st line, last line and no of lines in a file
>
>
> Hi,
> How to get first line, last line and no of lines in
> a file.....
>
> is there any perl functions available for that ?
> right now what i am doing is
>
> open file
> while (<FH>
> {
> $lines++;
> }
> close(FH)
>
> This operation is expensive..
> suppose, if file...
Is there a way to get PowerScript line number during run-time?Is there a way to get PowerScript line number during run-time?
gary
If it's in an error event then yes you can, it's a property of the error
structure - error.line
forums.sybase.com news wrote in message ...
>Is there a way to get PowerScript line number during run-time?
>
>
>gary
>
>
>
Hi,
You may want to use the PopulateError() function.
HTH
--
- Eric Aling [TeamPS], Cypres Informatisering bv, The Netherlands
http://ourworld.compuserve.com/homepages/alingejj
forums.sybase.com news wrote in message ...
>Is there a way ...
How to get the script line number of event/function during runtimeHi,
How to get the script line number of event/function during runtime in
Powerbuilder 8.
You can use SignalError() to invoke the systemerror event. The error
object contains the information you want.
HTH
Arthur Hefti
ksvimal wrote:
> Hi,
>
> How to get the script line number of event/function during runtime in
> Powerbuilder 8.
Hi
Use
Populateerror()
Regards
ksvimal pisze:
> Hi,
>
> How to get the script line number of event/function during runtime in
> Powerbuilder 8.
...
Any way to get the actual line number of a script error in IE?
I'm getting an error in IE that states there's an error on Line 3522, none of my external files go to that number so I assume IE is counting lines as if they all existed in the same document. Is there a way to easily tell where this is may be?I'm moving to Theory, everything works there.
In your browser, do a View Source. It is line 3522 of the compiled output page.
I would recommend using FireFox with FireBug. FireBug is great for debugging script errors.When you ask a question, remember to click "mark as answered" when you get a reply which answers your...
Read output from script line by line------_=_NextPart_001_01C56CC2.2D642292
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
Hello all,
Is there a way you read input from a script line by line. I'd rather
parse output line by line than do: @out =3D `script.sh`; which seems
sloppy. Or is that the best way?
TIA
------_=_NextPart_001_01C56CC2.2D642292--
This way works
open(my $FH, 'script.sh |') or die ...;
while (my $line =3D <$FH>) {
...
}
close($FH);
On 6/9/05, Tielman Koekemoer (TNE) <KoekemTN@telkom.co.za> wrote:
>...
how to get the content from mle line by lineI want to use the funtion TextLine(),but it need to set the insertion
point,and I do not want to get all
Use Mid() on the Text property to pick out any group of characters you'd
like.
"acme" <hbni@163.com> wrote in message news:4323f562$1@forums-1-dub...
> I want to use the funtion TextLine(),but it need to set the insertion
> point,and I do not want to get all
>
>
yes I do this,and I think MLE should be enhanced
"Jerry Siegel" <jerrys@dataDASHsciDOTcom.die.spammer.die.die.die> wrote in
message news:43259333$1@forums-2-du...
Object, script and line at execution lineHello,
I wold like to add to some messages of my application the exact place where
it is given
(the object, the script and the line) without typing them myself.
Is there any place where I can get this information at execution time?
For example, when a DB error rises, I get this information in the error
object in the system error script
of my application (Error.WindowMenu, Error.Object, Error.ObjectEvent,
Error.Text).
This is very useful to go to the script and solve the problem. I need this
information for my 'soft' errors.
Can anybody help me?
Thanks in advance,
...