Created
January 19, 2017 11:03
-
-
Save secwang/9a0ab7020eca7f8fc67f3c7c321be2d9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| my $filename = 'a.txt'; | |
| open(my $fh, '<:encoding(UTF-8)', $filename) | |
| or die "Could not open file '$filename' $!"; | |
| while (my $row = <$fh>) { | |
| chomp $row; | |
| if ($row =~ /data-sku="(.+?)"/) { | |
| print"$1\n"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment