i want to be able to treat contents of a file as an array and traverse through it that way without having to store them in an array,can i do that?if so how?
ssdeep
9
Light Poster
Recommended Answers
Jump to Posti want to be able to treat contents of a file as an array and traverse through it that way without having to store them in an array,can i do that?if so how?
Jump to PostWithin the file you need some sort of end of line marker to mark the end of a record (usually a '\n' but not always), and a delimiter between fields.
As an exampleopen my $DAT1, '<', 'archive/title.txt' or die 'cannot open file'; my @data1 = <$DAT1>; …
Jump to PostSince you're actually working with a string made up of 1 and 0, simply treat it like a string. That should take care of some of the complication. And you might try writing the changes to a different file - write each character to the new file, counting as the …
Jump to PostI've been able to use Tie::File on a Windows machine without any problems with the recsep = "\n"; (I don't have Notepad++ but there should be a setting somewhere to use Unix type line breaks.)
The problem is probably with line 54. Try removing the '\n' from it. The …
All 14 Replies
d5e5
109
Master Poster
ssdeep
9
Light Poster
ssdeep
9
Light Poster
Dandello
8
Posting Whiz in Training
ssdeep
9
Light Poster
Dandello
8
Posting Whiz in Training
ssdeep
9
Light Poster
Dandello
8
Posting Whiz in Training
Dandello
8
Posting Whiz in Training
ssdeep
9
Light Poster
ssdeep
9
Light Poster
Dandello
8
Posting Whiz in Training
ssdeep
9
Light Poster
Dandello
8
Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.