i have posted my response in the other thread -- so how do you delete unwanted treads? i am thankful for your quick
response just doing this for fun - what are you doing this for?
script that i am currently using:
#!/usr/bin/perl -w
open(FILE,"source.txt") || die "Where is Source File?: $!";
open MYFILE, ">export.txt";
select MYFILE;
while ( <FILE> )
{
if (/searchfield1/ || /searchfield3/ || /searchfield4/ || /searchfield4/) #I'm searching for any of these...
still not able to get this script running with the data that I have --
is there a print command that works?
I have a working script but it displays in columns not rows .
well I have killed this script - any suggestions appreciated.
#!/usr/bin/perl -w
use strict;
use warnings;
# location of read/open file:
open(Source,"test.txt") || die "Cannot open file: $!";
chomp @File;
# location of new/write file
open Export, ">export.xls";
select Export;
#...
sorry used the wrong terminology. I'll show you what I have
and what I'm looking to accomplish.
pulling data from a txt document similar to this:
**************************************************
From ???@??? Wed, Jan Sep 2008 10:52:56 -0400
Date: Wed, 10 Jan 2008 10:52:56 -0400
From...
possibly something like this ---
This doesn't work but i think you'll be able to see what I'm look for with it...
Trying to get data that is polled like this
1234
4567
abcd
Same
To poll like this instead
1234 abcd
4567 same
************************ something like this ***********...
Is there a way to print found data in rows instead of a vertical column?
overview:
using this to find data in a txt file
while ( <FILE> )
{
if( /1stfield/ || /2ndfield/)
#I'm searching for strings with the word '1stfield' and '2ndfield.'
{
and using print to poll data - need the...
solution -- the original file works
When you have the doc file open it can't save/delete because it's being used by another program in this case office 2007 which is sorta Temporamental to any type of sharing.
thanks for your assistance. I don't actually have a goal with this other then to learn something new. It's nice to work on this without a deadline. I like working on these scripts just in case I might need to know this in the future. I am getting a few errors but I don't mind it'll give me...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.