Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~5K People Reached
Favorite Tags

16 Posted Topics

Member Avatar for RingmasterTJ
Member Avatar for voidyman

Below code snippet when executed from within a perl script, gives only $datetime."12/31/9999,AUTO,.$datetime as ouput. my $datetime=`date "+%D %r"`; open(FIN,"<$file_in") or die $!."\n"; open(FOUT,">$file_out") or die $!."\n"; my @lines=<FIN>; close(FIN); foreach(@lines){ $msg=$_; chomp($msg); $msg=$msg.",".$datetime.",12/31/9999,AUTO,".$datetime; print FOUT $msg."\n"; } close(FOUT); If i remove the chomp though, it gives me the line …

Member Avatar for voidyman
0
137
Member Avatar for DJSarma

Try this. Using a hash and sorting by value #!/opt/local/bin/perl5 my $in="in"; my $out="out"; my $line; my $text; my @sentences; my %seen; open(SOURCE,"<in") or die $!."\n"; while ($line = <SOURCE>) { chomp($line); $text = $text.$line; } close(SOURCE); @sentences = split(/[!,?,.]/, $text); foreach(@sentences){ my $dummy=$_; $dummy=~s/^\s//g;##removing any beginning space $seen{$dummy}=scalar(split(/\s+/,$dummy)); } …

Member Avatar for voidyman
0
579
Member Avatar for voidyman

[CODE] #!opt/local/bin/perl5 use strict; use Spreadsheet::ParseExcel; use XLSX.pm; my $oExcel = new Spreadsheet::ParseExcel; die "You must provide a filename to $0 to be parsed as an Excel file" unless @ARGV; my $oBook = $oExcel->Parse($ARGV[0]); my($iR, $iC, $oWkS, $oWkC); print "FILE :", $oBook->{File} , "\n"; print "COUNT :", $oBook->{SheetCount} , "\n"; …

Member Avatar for 2teez
0
394
Member Avatar for voidyman

I want to know what exactly a DBreorg does.My understanding is that it recalculates the data distributions based on index. But how is this different from a update stats on a table? I understand that we have two types of reorg 1)online and 2)offline. Whats the differnce? Apologies, I dunno …

Member Avatar for pritaeas
0
91
Member Avatar for biojet

[QUOTE=;][/QUOTE] Looks to me liek you are trying to compare DNA sequences.. in that case will it be correct to assume that the character sets will all be of length 3? Also i suspect these files would run into millions of rows then?

Member Avatar for biojet
0
178
Member Avatar for chandbasha

if you have a large number of blakclisted entrie (blacklist=1), adding an index on that column will help your query time. And as smantscheff suggested do a grep -v -f file_containg_patterns filecontaining_output(or sed '/pattern/d') to exclude the unwanted email patterns.

Member Avatar for fobos
1
241
Member Avatar for sandeepau
Member Avatar for voidyman
0
405
Member Avatar for voidyman

Hi, Am trying to copy all the directories alone within a directory. I tried something like [CODE] ls -ltr | awk '$1 ~/^d/{print $8} ' | xargs cp -r dest_dir [/CODE] the first part [CODE]ls -ltr | awk '$1 ~/^d/{print $8} ' [/CODE] gives O/P Testing But it keeps saying …

Member Avatar for rubberman
0
68
Member Avatar for b1izzard
Member Avatar for brax4444

Should not be trying to open and close files if you can help it. [CODE] `cut -f 1 file> Data1`; [/CODE] and so on.. then do a sed to remove the first two lines of all the Data(num) files.

Member Avatar for voidyman
0
471
Member Avatar for voidyman

I want to remove blank lines (empty or with spaces and tabs) from a file from within a perl script. here's what i tried. [CODE]`sed '/^ *\$/d' $file1`;[/CODE] Does not seem to work for some reason. Any Help please?

Member Avatar for voidyman
0
933
Member Avatar for newbie14

[CODE] SELECT productID,totalAmountAfter,transactionDate FROM( SELECT * from tbltransaction WHERE transactionDate BETWEEN '2010-01-01' AND '2010-12-31' ) A having A.transactionDate =max(A.transactionDate ) [/CODE] Should work

Member Avatar for smantscheff
0
106
Member Avatar for voidyman

Hi, Is there a way i can pass variable column names to a stored proc? Here's what i want to do: i have lots of tables and for each of those i want to select out a few columns. e.g from table titles i want to pick out title_name and …

Member Avatar for debasisdas
0
618
Member Avatar for voidyman

Hi i want to grep for two different patterns in the same file and diff the results(without needing to store them) I amnot able to get diff to accept the output of the two greps as arguments. Any help? Thanks for your time.

Member Avatar for AnkushChander
0
124
Member Avatar for voidyman

Hi, I want to ftp a file to a location and then kickstart a process there to work on the file. I tried using !rexec but it does not seem to be working too well. I am not using the .netrc file(if that helps you understand my problems better) Thanks …

Member Avatar for voidyman
0
104

The End.